Ignore status updates without datapoints
This commit is contained in:
committed by
rospogrigio
parent
b2c4e93a47
commit
5cd76f87ea
@@ -163,10 +163,11 @@ class TuyaDevice(pytuya.TuyaListener):
|
|||||||
@callback
|
@callback
|
||||||
def status_updated(self, status):
|
def status_updated(self, status):
|
||||||
"""Device updated status."""
|
"""Device updated status."""
|
||||||
self._status.update(status["dps"])
|
if "dps" in status:
|
||||||
|
self._status.update(status["dps"])
|
||||||
|
|
||||||
signal = f"localtuya_{self._config_entry[CONF_DEVICE_ID]}"
|
signal = f"localtuya_{self._config_entry[CONF_DEVICE_ID]}"
|
||||||
async_dispatcher_send(self._hass, signal, self._status)
|
async_dispatcher_send(self._hass, signal, self._status)
|
||||||
|
|
||||||
@callback
|
@callback
|
||||||
def disconnected(self, exc):
|
def disconnected(self, exc):
|
||||||
|
Reference in New Issue
Block a user