From 34f36479c62564758911e14f67a1813c9259cedd Mon Sep 17 00:00:00 2001 From: Stefan Jonasson Date: Sun, 20 Sep 2015 21:29:38 +0200 Subject: [PATCH] Fix states not updating after command was sent! --- 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 3f7002b5b03..f5e74029ced 100644 --- a/homeassistant/components/light/tellstick.py +++ b/homeassistant/components/light/tellstick.py @@ -80,6 +80,7 @@ class TellstickLight(Light): """ Turns the switch off. """ self.tellstick_device.turn_off() self._brightness = 0 + self.update_ha_state() def turn_on(self, **kwargs): """ Turns the switch on. """ @@ -91,6 +92,7 @@ class TellstickLight(Light): self._brightness = brightness self.tellstick_device.dim(self._brightness) + self.update_ha_state() def update(self): """ Update state of the light. """ diff --git a/homeassistant/components/switch/tellstick.py b/homeassistant/components/switch/tellstick.py index 8f0150543de..42ce7af9926 100644 --- a/homeassistant/components/switch/tellstick.py +++ b/homeassistant/components/switch/tellstick.py @@ -97,8 +97,10 @@ class TellstickSwitchDevice(ToggleEntity): """ Turns the switch on. """ for _ in range(self.signal_repetitions): self.tellstick_device.turn_on() + self.update_ha_state() def turn_off(self, **kwargs): """ Turns the switch off. """ for _ in range(self.signal_repetitions): self.tellstick_device.turn_off() + self.update_ha_state()