Add contextual logging where applicable (#124)

* Add contextual logging where applicable

* Compress device id in log output
This commit is contained in:
Pierre Ståhl
2020-11-17 12:54:01 +01:00
committed by GitHub
parent c8a44019fa
commit 0531a284c7
8 changed files with 98 additions and 66 deletions

View File

@@ -38,7 +38,7 @@ class LocaltuyaSwitch(LocalTuyaEntity, SwitchEntity):
**kwargs,
):
"""Initialize the Tuya switch."""
super().__init__(device, config_entry, switchid, **kwargs)
super().__init__(device, config_entry, switchid, _LOGGER, **kwargs)
self._state = None
print("Initialized switch [{}]".format(self.name))