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
1 changed files with 4 additions and 2 deletions
|
@ -83,7 +83,9 @@ class TellstickLight(TellstickDevice, Light):
|
|||
def _send_device_command(self, requested_state, requested_data):
|
||||
"""Let tellcore update the actual device to the requested state."""
|
||||
if requested_state:
|
||||
brightness = requested_data
|
||||
self._tellcore_device.dim(brightness)
|
||||
if requested_data is not None:
|
||||
self._brightness = int(requested_data)
|
||||
|
||||
self._tellcore_device.dim(self._brightness)
|
||||
else:
|
||||
self._tellcore_device.turn_off()
|
||||
|
|
Loading…
Add table
Reference in a new issue