mirror of
https://github.com/home-assistant/core.git
synced 2025-07-28 07:37:34 +00:00
Simplify MQTT light brightness logic (#35097)
This commit is contained in:
parent
90fbb150e7
commit
e7fc886992
@ -428,9 +428,7 @@ class MqttLightJson(
|
||||
if self._brightness is not None:
|
||||
brightness = 255
|
||||
else:
|
||||
brightness = kwargs.get(
|
||||
ATTR_BRIGHTNESS, self._brightness if self._brightness else 255
|
||||
)
|
||||
brightness = kwargs.get(ATTR_BRIGHTNESS, 255)
|
||||
rgb = color_util.color_hsv_to_RGB(
|
||||
hs_color[0], hs_color[1], brightness / 255 * 100
|
||||
)
|
||||
|
Loading…
x
Reference in New Issue
Block a user