Added callback logging.
This commit is contained in:
parent
48df06d1c0
commit
b6bf398859
2 changed files with 4 additions and 0 deletions
homeassistant/components
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue