Merge pull request #737 from deejaybeam/dev

fix: current_page does not extist anymore
This commit is contained in:
Chris
2023-04-26 23:40:55 +02:00
committed by GitHub

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";'