Skip to content

Commit

Permalink
[light.tradfri] Fix transition time (#9785)
Browse files Browse the repository at this point in the history
* Fix transition time, set a default

* Wrong default

* Use int for safety

* Revert default.
  • Loading branch information
lwis authored and balloob committed Oct 15, 2017
1 parent 9b43388 commit 431201c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions homeassistant/components/light/tradfri.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ def async_turn_on(self, **kwargs):
"""Instruct the group lights to turn on, or dim."""
keys = {}
if ATTR_TRANSITION in kwargs:
keys['transition_time'] = int(kwargs[ATTR_TRANSITION])
keys['transition_time'] = int(kwargs[ATTR_TRANSITION]) * 10

if ATTR_BRIGHTNESS in kwargs:
self.hass.async_add_job(self._api(
Expand Down Expand Up @@ -259,7 +259,7 @@ def async_turn_on(self, **kwargs):

keys = {}
if ATTR_TRANSITION in kwargs:
keys['transition_time'] = int(kwargs[ATTR_TRANSITION])
keys['transition_time'] = int(kwargs[ATTR_TRANSITION]) * 10

if ATTR_BRIGHTNESS in kwargs:
self.hass.async_add_job(self._api(
Expand Down

0 comments on commit 431201c

Please sign in to comment.