mirror of
https://github.com/home-assistant/core.git
synced 2025-07-13 16:27:08 +00:00
Fix states not updating after command was sent!
This commit is contained in:
parent
a60a9202a5
commit
34f36479c6
@ -80,6 +80,7 @@ class TellstickLight(Light):
|
|||||||
""" Turns the switch off. """
|
""" Turns the switch off. """
|
||||||
self.tellstick_device.turn_off()
|
self.tellstick_device.turn_off()
|
||||||
self._brightness = 0
|
self._brightness = 0
|
||||||
|
self.update_ha_state()
|
||||||
|
|
||||||
def turn_on(self, **kwargs):
|
def turn_on(self, **kwargs):
|
||||||
""" Turns the switch on. """
|
""" Turns the switch on. """
|
||||||
@ -91,6 +92,7 @@ class TellstickLight(Light):
|
|||||||
self._brightness = brightness
|
self._brightness = brightness
|
||||||
|
|
||||||
self.tellstick_device.dim(self._brightness)
|
self.tellstick_device.dim(self._brightness)
|
||||||
|
self.update_ha_state()
|
||||||
|
|
||||||
def update(self):
|
def update(self):
|
||||||
""" Update state of the light. """
|
""" Update state of the light. """
|
||||||
|
@ -97,8 +97,10 @@ class TellstickSwitchDevice(ToggleEntity):
|
|||||||
""" Turns the switch on. """
|
""" Turns the switch on. """
|
||||||
for _ in range(self.signal_repetitions):
|
for _ in range(self.signal_repetitions):
|
||||||
self.tellstick_device.turn_on()
|
self.tellstick_device.turn_on()
|
||||||
|
self.update_ha_state()
|
||||||
|
|
||||||
def turn_off(self, **kwargs):
|
def turn_off(self, **kwargs):
|
||||||
""" Turns the switch off. """
|
""" Turns the switch off. """
|
||||||
for _ in range(self.signal_repetitions):
|
for _ in range(self.signal_repetitions):
|
||||||
self.tellstick_device.turn_off()
|
self.tellstick_device.turn_off()
|
||||||
|
self.update_ha_state()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user