mirror of
https://github.com/home-assistant/core.git
synced 2025-08-03 04:35:11 +02:00
committed by
Pascal Vizeli
parent
1892eb654f
commit
6507cc1dc8
@@ -116,8 +116,8 @@ class DecoraWifiLight(Light):
|
||||
attribs = {'power': 'ON'}
|
||||
|
||||
if ATTR_BRIGHTNESS in kwargs:
|
||||
min_level = self._switch.get('minLevel', 0)
|
||||
max_level = self._switch.get('maxLevel', 100)
|
||||
min_level = self._switch.data.get('minLevel', 0)
|
||||
max_level = self._switch.data.get('maxLevel', 100)
|
||||
brightness = int(kwargs[ATTR_BRIGHTNESS] * max_level / 255)
|
||||
brightness = max(brightness, min_level)
|
||||
attribs['brightness'] = brightness
|
||||
|
Reference in New Issue
Block a user