mirror of
https://github.com/home-assistant/core.git
synced 2025-08-03 04:35:11 +02:00
Simplify MQTT light brightness logic (#35097)
This commit is contained in:
@@ -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
|
||||
)
|
||||
|
Reference in New Issue
Block a user