Add logging and stability fixes

This commit is contained in:
Pierre Ståhl
2020-10-09 10:21:45 +02:00
committed by rospogrigio
parent 7384f1fc54
commit ff3ca99b29
2 changed files with 17 additions and 13 deletions

View File

@@ -181,8 +181,7 @@ class TuyaDevice(pytuya.TuyaListener):
@callback
def disconnected(self, exc):
"""Device disconnected."""
if exc is not None:
_LOGGER.error("Disconnected from %: %s", exc)
_LOGGER.debug("Disconnected from %s: %s", self.id, exc)
signal = f"localtuya_{self._config_entry[CONF_DEVICE_ID]}"
async_dispatcher_send(self._hass, signal, None)