From b6bf398859ec36778a554f53fdd165833b5eace6 Mon Sep 17 00:00:00 2001 From: Stefan Jonasson Date: Wed, 23 Sep 2015 11:07:37 +0200 Subject: [PATCH] Added callback logging. --- homeassistant/components/light/tellstick.py | 2 ++ homeassistant/components/switch/tellstick.py | 2 ++ 2 files changed, 4 insertions(+) diff --git a/homeassistant/components/light/tellstick.py b/homeassistant/components/light/tellstick.py index fa8e5210309..15faf673451 100644 --- a/homeassistant/components/light/tellstick.py +++ b/homeassistant/components/light/tellstick.py @@ -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) diff --git a/homeassistant/components/switch/tellstick.py b/homeassistant/components/switch/tellstick.py index a6d22fb4c99..e82b73426cb 100644 --- a/homeassistant/components/switch/tellstick.py +++ b/homeassistant/components/switch/tellstick.py @@ -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