Optimize wake_up_display service
This commit is contained in:
@@ -386,10 +386,13 @@ api:
|
|||||||
reset_timer: bool
|
reset_timer: bool
|
||||||
then:
|
then:
|
||||||
- lambda: |-
|
- lambda: |-
|
||||||
if (id(current_page).state == "screensaver") id(disp1).send_command_printf("page %i", id(wakeup_page_id));
|
if (id(current_page).state == "home")
|
||||||
|
{
|
||||||
|
id(disp1).send_command_printf("home.dimtimer.en=1");
|
||||||
|
id(disp1).send_command_printf("home.sleeptimer.en=1");
|
||||||
|
}
|
||||||
|
else if (id(current_page).state == "screensaver") id(disp1).send_command_printf("page %i", id(wakeup_page_id));
|
||||||
id(disp1).send_command_printf("dim=brightness");
|
id(disp1).send_command_printf("dim=brightness");
|
||||||
id(disp1).send_command_printf("home.dimtimer.en=1");
|
|
||||||
id(disp1).send_command_printf("home.sleeptimer.en=1");
|
|
||||||
if (reset_timer) id(page_timer)->execute(int(id(page_timeout).state));
|
if (reset_timer) id(page_timer)->execute(int(id(page_timeout).state));
|
||||||
|
|
||||||
#### Service to set the entities ####
|
#### Service to set the entities ####
|
||||||
|
|||||||
Reference in New Issue
Block a user