Merge pull request #416 from stefan-jonasson/dev
Fix states not updating after command was sent!pull/435/head
commit
f0991d63d1
|
@ -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. """
|
||||
|
|
|
@ -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()
|
||||
|
|
Loading…
Reference in New Issue