فهرست منبع

cloud: adapt callback to tuya-device-sharing-sdk 0.2.1

New argument passed to update_device callback. Not sure if this is
responsible for the silent failures on my system.
Jason Rumney 1 سال پیش
والد
کامیت
8283ce9f71
1فایلهای تغییر یافته به همراه7 افزوده شده و 2 حذف شده
  1. 7 2
      custom_components/tuya_local/cloud.py

+ 7 - 2
custom_components/tuya_local/cloud.py

@@ -230,12 +230,17 @@ class DeviceListener(SharingDeviceListener):
         self.__hass = hass
         self._manager = manager
 
-    def update_device(self, device: CustomerDevice) -> None:
+    def update_device(
+        self,
+        device: CustomerDevice,
+        updated_status_properties: list[str] | None,
+    ) -> None:
         """Device status has updated."""
         _LOGGER.debug(
-            "Received update for device %s: %s",
+            "Received update for device %s: %s (properties %s)",
             device.id,
             self._manager.device_map[device.id].status,
+            updated_status_properties,
         )
 
     def add_device(self, device: CustomerDevice) -> None: