mirror of
https://github.com/home-assistant/core.git
synced 2025-04-26 02:07:54 +00:00
Tellstick light fix (#5482)
* Fixed crash when lights objects was inited * Fixed initial value for tellstick lights * Fixed problem with lights not working with the turn_on action.
This commit is contained in:
parent
13d801e1c6
commit
ed12f9e237
@ -83,7 +83,9 @@ class TellstickLight(TellstickDevice, Light):
|
|||||||
def _send_device_command(self, requested_state, requested_data):
|
def _send_device_command(self, requested_state, requested_data):
|
||||||
"""Let tellcore update the actual device to the requested state."""
|
"""Let tellcore update the actual device to the requested state."""
|
||||||
if requested_state:
|
if requested_state:
|
||||||
brightness = requested_data
|
if requested_data is not None:
|
||||||
self._tellcore_device.dim(brightness)
|
self._brightness = int(requested_data)
|
||||||
|
|
||||||
|
self._tellcore_device.dim(self._brightness)
|
||||||
else:
|
else:
|
||||||
self._tellcore_device.turn_off()
|
self._tellcore_device.turn_off()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user