Explorar o código

fix(devices): instruct home assistant to fetch device state if unavailable

Ivann LARUELLE %!s(int64=3) %!d(string=hai) anos
pai
achega
0c74739780
Modificáronse 1 ficheiros con 2 adicións e 0 borrados
  1. 2 0
      custom_components/tuya_local/device.py

+ 2 - 0
custom_components/tuya_local/device.py

@@ -403,6 +403,8 @@ class TuyaLocalDevice(object):
                 self._api_protocol_working = True
                 return retval
             except Exception as e:
+                for entity in self._children:
+                    entity.async_schedule_update_ha_state()
                 _LOGGER.debug(
                     f"Retrying after exception {e} ({i}/{connections})",
                 )