Fix change brightness when sleeping
Prevents the panel to change screen brightness when sleeping. Solves #975
This commit is contained in:
@@ -1175,6 +1175,17 @@ number:
|
||||
restore_value: true
|
||||
optimistic: true
|
||||
set_action:
|
||||
then:
|
||||
- if:
|
||||
condition:
|
||||
- binary_sensor.is_on: nextion_init
|
||||
then:
|
||||
- if:
|
||||
condition:
|
||||
- not:
|
||||
- text_sensor.state: # Is sleeping?
|
||||
id: current_page
|
||||
state: 'screensaver'
|
||||
then:
|
||||
- lambda: 'id(disp1).set_backlight_brightness(x/100);'
|
||||
- lambda: 'id(disp1).send_command_printf("home.brightness.val=%i", int(x));'
|
||||
|
||||
Reference in New Issue
Block a user