Fix broken support for 0d devices

This commit is contained in:
Pierre Ståhl
2020-10-15 13:51:30 +02:00
committed by rospogrigio
parent 5d64cb4e18
commit 81c04bfc4e
2 changed files with 18 additions and 11 deletions

View File

@@ -186,11 +186,10 @@ class TuyaDevice(pytuya.TuyaListener):
@callback
def status_updated(self, status):
"""Device updated status."""
if "dps" in status:
self._status.update(status["dps"])
self._status.update(status)
signal = f"localtuya_{self._config_entry[CONF_DEVICE_ID]}"
async_dispatcher_send(self._hass, signal, self._status)
signal = f"localtuya_{self._config_entry[CONF_DEVICE_ID]}"
async_dispatcher_send(self._hass, signal, self._status)
@callback
def disconnected(self, exc):