fix: current_page does not exist anymore

This commit is contained in:
deejaybeam
2023-04-26 23:39:35 +02:00
parent 89ad6426ed
commit f609e92c0d

View File

@@ -377,21 +377,17 @@ api:
variables: variables:
option: string option: string
then: then:
- if: - lambda: |-
condition: DynamicJsonDocument doc(1024);
text_sensor.state: deserializeJson(doc, id(disp1_nspanel_event).state);
id: disp1_currentpage std::string page = doc["page"];
state: 'screensaver' if (page == "screensaver") {
then: id(disp1).send_command_printf("page home");
- lambda: id(disp1).send_command_printf("page home"); } else {
else: if (page == "home"){
- if: id(disp1).send_command_printf("dim=brightness.val");
condition: }
text_sensor.state: }
id: disp1_currentpage
state: 'home'
then:
- lambda: id(disp1).send_command_printf("dim=brightness.val");
- if: - if:
condition: condition:
- lambda: 'return option == "keep_wake";' - lambda: 'return option == "keep_wake";'