From 47e00f1bd3db5515dc45f67033b77be28d862bf2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yi=C4=9Fit=20Topcu?= Date: Fri, 3 May 2024 07:36:31 +0300 Subject: [PATCH 1/5] v1.0.4 --- custom_components/dreame_vacuum/camera.py | 6 +----- custom_components/dreame_vacuum/manifest.json | 2 +- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/custom_components/dreame_vacuum/camera.py b/custom_components/dreame_vacuum/camera.py index 94e61b9..808acb6 100644 --- a/custom_components/dreame_vacuum/camera.py +++ b/custom_components/dreame_vacuum/camera.py @@ -305,7 +305,7 @@ async def _update_image(self, map_data, robot_status) -> None: self._image = self._renderer.render_map(map_data, robot_status) if not self.entity_description.map_data_json and self._calibration_points != self._renderer.calibration_points: self._calibration_points = self._renderer.calibration_points - self.coordinator.async_set_updated_data() + self.coordinator.set_updated_data() @property def _map_data(self) -> Any: @@ -321,10 +321,6 @@ def _default_map_image(self) -> Any: def frame_interval(self) -> float: return 0.25 - @property - def supported_features(self) -> int: - return 0 - @property def state(self) -> str: """Return the status of the map.""" diff --git a/custom_components/dreame_vacuum/manifest.json b/custom_components/dreame_vacuum/manifest.json index 5b99e35..49575a4 100644 --- a/custom_components/dreame_vacuum/manifest.json +++ b/custom_components/dreame_vacuum/manifest.json @@ -19,5 +19,5 @@ "tzlocal", "paho-mqtt" ], - "version": "v1.0.3" + "version": "v1.0.4" } \ No newline at end of file From 64e02de5418e5a229bdb397f7520d498e5cb7bf2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yi=C4=9Fit=20Topcu?= Date: Fri, 3 May 2024 12:44:38 +0300 Subject: [PATCH 2/5] v0.0.2 --- custom_components/dreame_vacuum/dreame/protocol.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/custom_components/dreame_vacuum/dreame/protocol.py b/custom_components/dreame_vacuum/dreame/protocol.py index 4b16cc2..7bc530b 100644 --- a/custom_components/dreame_vacuum/dreame/protocol.py +++ b/custom_components/dreame_vacuum/dreame/protocol.py @@ -4,9 +4,10 @@ import json import base64 import hmac -import time, locale, datetime +import time, locale import tzlocal import requests +from datetime import datetime from typing import Any, Dict, Optional, Tuple from .exceptions import DeviceException from typing import Any, Optional, Tuple @@ -64,7 +65,7 @@ def __init__(self, username: str, password: str, country: str) -> None: self._fail_count = 0 self._connected = False try: - timezone = datetime.datetime.now(tzlocal.get_localzone()).strftime("%z") + timezone = datetime.now(tzlocal.get_localzone()).strftime("%z") timezone = "GMT{0}:{1}".format(timezone[:-2], timezone[-2:]) except: timezone = "GMT+00:00" From c6b21d2fd80f5cf4816caa038debd91ed770cdc4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yi=C4=9Fit=20Topcu?= Date: Fri, 3 May 2024 12:44:38 +0300 Subject: [PATCH 3/5] v1.0.5 --- custom_components/dreame_vacuum/dreame/protocol.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/custom_components/dreame_vacuum/dreame/protocol.py b/custom_components/dreame_vacuum/dreame/protocol.py index 4b16cc2..7bc530b 100644 --- a/custom_components/dreame_vacuum/dreame/protocol.py +++ b/custom_components/dreame_vacuum/dreame/protocol.py @@ -4,9 +4,10 @@ import json import base64 import hmac -import time, locale, datetime +import time, locale import tzlocal import requests +from datetime import datetime from typing import Any, Dict, Optional, Tuple from .exceptions import DeviceException from typing import Any, Optional, Tuple @@ -64,7 +65,7 @@ def __init__(self, username: str, password: str, country: str) -> None: self._fail_count = 0 self._connected = False try: - timezone = datetime.datetime.now(tzlocal.get_localzone()).strftime("%z") + timezone = datetime.now(tzlocal.get_localzone()).strftime("%z") timezone = "GMT{0}:{1}".format(timezone[:-2], timezone[-2:]) except: timezone = "GMT+00:00" From 8cf0895b8d763c40bc6ee5f70d9ebc22601bfed2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yi=C4=9Fit=20Topcu?= Date: Fri, 3 May 2024 14:14:03 +0300 Subject: [PATCH 4/5] v1.0.5 --- custom_components/dreame_vacuum/dreame/protocol.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/custom_components/dreame_vacuum/dreame/protocol.py b/custom_components/dreame_vacuum/dreame/protocol.py index 7bc530b..82e18a5 100644 --- a/custom_components/dreame_vacuum/dreame/protocol.py +++ b/custom_components/dreame_vacuum/dreame/protocol.py @@ -5,9 +5,7 @@ import base64 import hmac import time, locale -import tzlocal import requests -from datetime import datetime from typing import Any, Dict, Optional, Tuple from .exceptions import DeviceException from typing import Any, Optional, Tuple @@ -65,11 +63,10 @@ def __init__(self, username: str, password: str, country: str) -> None: self._fail_count = 0 self._connected = False try: - timezone = datetime.now(tzlocal.get_localzone()).strftime("%z") - timezone = "GMT{0}:{1}".format(timezone[:-2], timezone[-2:]) + offset = (time.timezone if (time.localtime().tm_isdst == 0) else time.altzone) / 60 * -1 + self._timezone = "GMT{}{:02d}:{:02d}".format('+' if offset >= 0 else '-', abs(int(offset / 60)), int(offset % 60)) except: - timezone = "GMT+00:00" - self._timezone = timezone + self._timezone = "GMT+00:00" def _api_call(self, url, params): return self.request(f"{self.get_api_url()}/{url}", {"data": json.dumps(params, separators=(",", ":"))}) From fe3133384e14b0d9b2da6cca2c794d1507a39f98 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yi=C4=9Fit=20Topcu?= Date: Fri, 3 May 2024 14:15:37 +0300 Subject: [PATCH 5/5] v1.0.5 --- custom_components/dreame_vacuum/manifest.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/custom_components/dreame_vacuum/manifest.json b/custom_components/dreame_vacuum/manifest.json index 49575a4..41da6fc 100644 --- a/custom_components/dreame_vacuum/manifest.json +++ b/custom_components/dreame_vacuum/manifest.json @@ -16,8 +16,7 @@ "pycryptodome", "python-miio", "py-mini-racer", - "tzlocal", "paho-mqtt" ], - "version": "v1.0.4" + "version": "v1.0.5" } \ No newline at end of file