Skip to content

Commit 63fca76

Browse files
committed
fix otaProgress being a dictionary
1 parent e4b79ea commit 63fca76

4 files changed

Lines changed: 5 additions & 3 deletions

File tree

custom_components/mammotion/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -347,4 +347,5 @@ async def async_remove_config_entry_device(
347347
mower = next(
348348
(mower for mower in config_entry.runtime_data if mower.name == mower_name), None
349349
)
350+
350351
return not bool(mower)

custom_components/mammotion/coordinator.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
from pymammotion.data.model.device import MowerInfo, MowingDevice
2929
from pymammotion.data.model.device_config import OperationSettings, create_path_order
3030
from pymammotion.data.model.report_info import Maintain
31-
from pymammotion.data.mqtt.properties import ThingPropertiesMessage
31+
from pymammotion.data.mqtt.properties import OTAProgressItems, ThingPropertiesMessage
3232
from pymammotion.data.mqtt.status import ThingStatusMessage
3333
from pymammotion.http.model.camera_stream import (
3434
StreamSubscriptionResponse,
@@ -746,6 +746,7 @@ async def _async_update_properties(
746746
) -> None:
747747
"""Update data from incoming properties messages."""
748748
if ota_progress := properties.params.items.otaProgress:
749+
ota_progress.value = OTAProgressItems.from_dict(ota_progress.value)
749750
self.data.update_check.progress = ota_progress.value.progress
750751
self.data.update_check.isupgrading = True
751752
if ota_progress.value.progress == 100:

custom_components/mammotion/manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"domain": "mammotion",
33
"name": "Mammotion",
4-
"version": "0.2.64",
4+
"version": "0.2.65",
55
"issue_tracker": "https://github.com/mikey0000/Mammotion-HA/issues",
66
"integration_type": "device",
77
"bluetooth": [

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "Mammotion-HA"
3-
version = "0.2.64"
3+
version = "0.2.65"
44
description = "Mammotion lawn mower integration for HACS"
55
authors = ["Michael Arthur <michael@jumblesoft.co.nz>", "jLynx <@jlynx>"]
66
readme = "README.md"

0 commit comments

Comments
 (0)