Added callback logging.
This commit is contained in:
1 parent
48df06d1c0
commit
b6bf398859
2 files changed
+4
No files matched your search
@@ -40,6 +40,8 @@ def setup_platform(hass, config, add_devices_callback, discovery_info=None):
|
||||
for light_device in lights:
|
||||
if light_device.tellstick_device.id == id_:
|
||||
# Execute the update in another thread
|
||||
logging.getLogger(__name__).info(
|
||||
"Updating state to {}".switch_device.state())
|
||||
threading.Thread(target=light_device.update_ha_state, daemon=False, args=(True,)).start()
|
||||
light_device.update_ha_state(True)
|
||||
|
||||
|
||||
@@ -52,6 +52,8 @@ def setup_platform(hass, config, add_devices_callback, discovery_info=None):
|
||||
for switch_device in switches:
|
||||
if switch_device.tellstick_device.id == id_:
|
||||
# Execute the update in another thread
|
||||
logging.getLogger(__name__).info(
|
||||
"Updating state to {}".switch_device.state())
|
||||
threading.Thread(target=switch_device.update_ha_state, daemon=False).start()
|
||||
break
|
||||
|
||||
|
||||
Reference in new issue
Block a user