File tree Expand file tree Collapse file tree
custom_components/liebherr Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -64,15 +64,21 @@ async def async_turn_on(
6464 ) -> None :
6565 """Turn the light on."""
6666
67+ # turn on via switch brightness not so will try to set to previous brightness
68+ # a brightness of zero won't turn on the light so turn on to max brightness
69+ brightness : int = (
70+ kwargs [ATTR_BRIGHTNESS ]
71+ if kwargs [ATTR_BRIGHTNESS ]
72+ else (self ._attr_brightness if self ._attr_brightness else 255 )
73+ )
74+
6775 await self .coordinator .api .async_set_value (
6876 device_id = self ._device .device_id ,
6977 control = PresentationLightControlRequest (
70- math .ceil (
71- brightness_to_value (self .brightness_scale , kwargs [ATTR_BRIGHTNESS ])
72- )
78+ math .ceil (brightness_to_value (self .brightness_scale , brightness ))
7379 ),
7480 )
75- self ._attr_brightness = kwargs [ ATTR_BRIGHTNESS ]
81+ self ._attr_brightness = brightness
7682 self ._attr_is_on = True
7783 self .async_write_ha_state ()
7884
Original file line number Diff line number Diff line change 1212 "loggers" : [" pyliebherr" ],
1313 "requirements" : [" pyliebherr==2026.1.1" , " Pillow>=11.0.0" ],
1414 "single_config_entry" : true ,
15- "version" : " 2026.1.3 "
15+ "version" : " 2026.1.4 "
1616}
You can’t perform that action at this time.
0 commit comments