Skip to content

Commit b0678ad

Browse files
committed
update spino translations, bump pymammotion to fix task enable / disable, no longer remove ble device so it can be re-used to re-connect, bugfix where an error would cause a aliyun refresh
1 parent 77e9717 commit b0678ad

15 files changed

Lines changed: 63 additions & 37 deletions

File tree

custom_components/mammotion/__init__.py

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ async def _await_device_connection(
316316
with suppress(TransportError):
317317
await handle.connect_transport(TransportType.BLE)
318318
try:
319-
await handle.wait_until_connected(timeout=30, mqtt_stable_for=10)
319+
await handle.wait_until_connected(timeout=60, mqtt_stable_for=10)
320320
except CancelledError:
321321
raise HomeAssistantError("Setup cancelled, transport connection timed out")
322322

@@ -327,6 +327,15 @@ async def async_setup_entry(hass: HomeAssistant, entry: MammotionConfigEntry) ->
327327
addresses = entry.data.get(CONF_BLE_DEVICES, {})
328328
integration = await async_get_integration(hass, DOMAIN)
329329
mammotion = MammotionClient(ha_version=integration.version.split("-")[0])
330+
331+
async def shutdown_mammotion(_: Event | None = None) -> None:
332+
await mammotion.stop()
333+
334+
entry.async_on_unload(
335+
hass.bus.async_listen_once(EVENT_HOMEASSISTANT_STOP, shutdown_mammotion)
336+
)
337+
entry.async_on_unload(shutdown_mammotion)
338+
330339
account = entry.data.get(CONF_ACCOUNTNAME)
331340
password = entry.data.get(CONF_PASSWORD)
332341
use_wifi = entry.data.get(CONF_USE_WIFI, True)
@@ -654,14 +663,6 @@ async def _async_refresh_map(_: datetime) -> None:
654663

655664
mammotion.setup_all_mower_watchers()
656665

657-
async def shutdown_mammotion(_: Event | None = None) -> None:
658-
await mammotion.stop()
659-
660-
entry.async_on_unload(
661-
hass.bus.async_listen_once(EVENT_HOMEASSISTANT_STOP, shutdown_mammotion)
662-
)
663-
entry.async_on_unload(shutdown_mammotion)
664-
665666
await hass.config_entries.async_forward_entry_setups(entry, PLATFORMS)
666667

667668
return True

custom_components/mammotion/manifest.json

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -16,19 +16,11 @@
1616
"connectable": true
1717
}
1818
],
19-
"codeowners": [
20-
"@mikey0000"
21-
],
19+
"codeowners": ["@mikey0000"],
2220
"config_flow": true,
23-
"dependencies": [
24-
"bluetooth_adapters"
25-
],
21+
"dependencies": ["bluetooth_adapters"],
2622
"documentation": "https://github.com/mikey0000/Mammotion-HA/wiki",
27-
"loggers": [
28-
"pymammotion"
29-
],
23+
"loggers": ["pymammotion"],
3024
"iot_class": "local_push",
31-
"requirements": [
32-
"pymammotion==0.8.5"
33-
]
25+
"requirements": ["pymammotion==0.8.6"]
3426
}

custom_components/mammotion/translations/cs.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,12 +263,15 @@
263263
"ABORTED": "Přerušeno"
264264
}
265265
},
266+
"spino_battery": {
267+
"name": "Baterie"
268+
},
266269
"spino_status": {
267270
"name": "Stav",
268271
"state": {
269272
"UNKNOWN": "Neznámý",
270273
"IDLE": "Pohotovostní režim",
271-
"PREPARE": "Příprava",
274+
"PREPARE": "Pohotovostní režim",
272275
"WAIT_WATER": "Napouštění vody",
273276
"WORKING": "Pracuje",
274277
"PAUSE_GO_CHARGE": "Návrat k nabíjení (pozastaveno)",

custom_components/mammotion/translations/da.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,12 +263,15 @@
263263
"ABORTED": "Afbrudt"
264264
}
265265
},
266+
"spino_battery": {
267+
"name": "Batteri"
268+
},
266269
"spino_status": {
267270
"name": "Status",
268271
"state": {
269272
"UNKNOWN": "Ukendt",
270273
"IDLE": "Standby",
271-
"PREPARE": "Forbereder",
274+
"PREPARE": "Standby",
272275
"WAIT_WATER": "Fylder med vand",
273276
"WORKING": "Arbejder",
274277
"PAUSE_GO_CHARGE": "Vender tilbage til opladning (pause)",

custom_components/mammotion/translations/de.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,12 +263,15 @@
263263
"ABORTED": "Abgebrochen"
264264
}
265265
},
266+
"spino_battery": {
267+
"name": "Akku"
268+
},
266269
"spino_status": {
267270
"name": "Status",
268271
"state": {
269272
"UNKNOWN": "Unbekannt",
270273
"IDLE": "Bereitschaft",
271-
"PREPARE": "Vorbereitung",
274+
"PREPARE": "Bereitschaft",
272275
"WAIT_WATER": "Füllt mit Wasser",
273276
"WORKING": "Arbeitet",
274277
"PAUSE_GO_CHARGE": "Rückkehr zum Laden (pausiert)",

custom_components/mammotion/translations/fr.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,12 +263,15 @@
263263
"ABORTED": "Abandonné"
264264
}
265265
},
266+
"spino_battery": {
267+
"name": "Batterie"
268+
},
266269
"spino_status": {
267270
"name": "Statut",
268271
"state": {
269272
"UNKNOWN": "Inconnu",
270273
"IDLE": "Veille",
271-
"PREPARE": "Préparation",
274+
"PREPARE": "Veille",
272275
"WAIT_WATER": "Remplissage d'eau",
273276
"WORKING": "En marche",
274277
"PAUSE_GO_CHARGE": "Retour en charge (en pause)",

custom_components/mammotion/translations/hu.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,12 +263,15 @@
263263
"CON_WIFI": "Wi-Fi"
264264
}
265265
},
266+
"spino_battery": {
267+
"name": "Akkumulátor"
268+
},
266269
"spino_status": {
267270
"name": "Állapot",
268271
"state": {
269272
"UNKNOWN": "Ismeretlen",
270273
"IDLE": "Készenlét",
271-
"PREPARE": "Előkészítés",
274+
"PREPARE": "Készenlét",
272275
"WAIT_WATER": "Vízzel töltés",
273276
"WORKING": "Dolgozik",
274277
"PAUSE_GO_CHARGE": "Visszatérés töltésre (szüneteltetve)",

custom_components/mammotion/translations/it.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,12 +263,15 @@
263263
"ABORTED": "Interrotto"
264264
}
265265
},
266+
"spino_battery": {
267+
"name": "Batteria"
268+
},
266269
"spino_status": {
267270
"name": "Stato",
268271
"state": {
269272
"UNKNOWN": "Sconosciuto",
270273
"IDLE": "Standby",
271-
"PREPARE": "Preparazione",
274+
"PREPARE": "Standby",
272275
"WAIT_WATER": "Riempimento d'acqua",
273276
"WORKING": "In funzione",
274277
"PAUSE_GO_CHARGE": "Ritorno alla ricarica (in pausa)",

custom_components/mammotion/translations/nl.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,12 +263,15 @@
263263
"ABORTED": "Afgebroken"
264264
}
265265
},
266+
"spino_battery": {
267+
"name": "Batterij"
268+
},
266269
"spino_status": {
267270
"name": "Status",
268271
"state": {
269272
"UNKNOWN": "Onbekend",
270273
"IDLE": "Stand-by",
271-
"PREPARE": "Voorbereiden",
274+
"PREPARE": "Stand-by",
272275
"WAIT_WATER": "Vullen met water",
273276
"WORKING": "Bezig",
274277
"PAUSE_GO_CHARGE": "Terug naar laden (gepauzeerd)",

custom_components/mammotion/translations/pl.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,12 +263,15 @@
263263
"ABORTED": "Przerwano"
264264
}
265265
},
266+
"spino_battery": {
267+
"name": "Bateria"
268+
},
266269
"spino_status": {
267270
"name": "Stan",
268271
"state": {
269272
"UNKNOWN": "Nieznany",
270273
"IDLE": "Czuwanie",
271-
"PREPARE": "Przygotowanie",
274+
"PREPARE": "Czuwanie",
272275
"WAIT_WATER": "Napełnianie wodą",
273276
"WORKING": "Pracuje",
274277
"PAUSE_GO_CHARGE": "Powrót do ładowania (wstrzymano)",

0 commit comments

Comments
 (0)