mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 21:27:38 +00:00
Fix tradfri problem with brightness (#10359)
* Fix problem with brightness * Fix typo * Typo
This commit is contained in:
parent
aae9697d9a
commit
73cd902857
@ -108,6 +108,9 @@ class TradfriGroup(Light):
|
||||
keys['transition_time'] = int(kwargs[ATTR_TRANSITION]) * 10
|
||||
|
||||
if ATTR_BRIGHTNESS in kwargs:
|
||||
if kwargs[ATTR_BRIGHTNESS] == 255:
|
||||
kwargs[ATTR_BRIGHTNESS] = 254
|
||||
|
||||
self.hass.async_add_job(self._api(
|
||||
self._group.set_dimmer(kwargs[ATTR_BRIGHTNESS], **keys)))
|
||||
else:
|
||||
@ -264,6 +267,9 @@ class TradfriLight(Light):
|
||||
keys['transition_time'] = int(kwargs[ATTR_TRANSITION]) * 10
|
||||
|
||||
if ATTR_BRIGHTNESS in kwargs:
|
||||
if kwargs[ATTR_BRIGHTNESS] == 255:
|
||||
kwargs[ATTR_BRIGHTNESS] = 254
|
||||
|
||||
self.hass.async_add_job(self._api(
|
||||
self._light_control.set_dimmer(kwargs[ATTR_BRIGHTNESS],
|
||||
**keys)))
|
||||
|
Loading…
x
Reference in New Issue
Block a user