fix: fallback state

This commit is contained in:
deejaybeam
2023-04-02 08:49:02 +02:00
parent df10d09736
commit a8172a1b06

View File

@@ -419,13 +419,15 @@ binary_sensor:
api.connected: api.connected:
then: then:
- switch.toggle: relay_1 - switch.toggle: relay_1
- lambda: id(disp1).send_command_printf("home.icon_top_01.pic=51");
- lambda: id(disp1).send_command_printf("home.left_bt_pic.pic=98");
- if: - if:
condition: condition:
switch.is_on: relay_1 switch.is_on: relay_1
then: then:
- lambda: id(disp1).send_command_printf("home.icon_top_01.pic=105"); - lambda: id(disp1).send_command_printf("home.left_bt_pic.pic=78");
- lambda: id(disp1).send_command_printf("home.icon_top_01","\U0000E3A5");
else:
- lambda: id(disp1).send_command_printf("home.left_bt_pic.pic=77");
- lambda: id(disp1).send_command_printf("home.icon_top_01","\U0000FFFF");
##### RIGHT BUTTON BELOW DISPLAY TO TOGGLE RELAY ##### ##### RIGHT BUTTON BELOW DISPLAY TO TOGGLE RELAY #####
@@ -445,13 +447,15 @@ binary_sensor:
api.connected: api.connected:
then: then:
- switch.toggle: relay_2 - switch.toggle: relay_2
- lambda: id(disp1).send_command_printf("home.icon_top_02.pic=51");
- lambda: id(disp1).send_command_printf("home.right_bt_pic.pic=98");
- if: - if:
condition: condition:
switch.is_on: relay_2 switch.is_on: relay_2
then: then:
- lambda: id(disp1).send_command_printf("home.icon_top_02.pic=106"); - lambda: id(disp1).send_command_printf("home.right_bt_pic.pic=78");
- lambda: id(disp1).send_command_printf("home.icon_top_02","\U0000E3A8");
else:
- lambda: id(disp1).send_command_printf("home.right_bt_pic.pic=77");
- lambda: id(disp1).send_command_printf("home.icon_top_02","\U0000FFFF");
##### JUMP PAGE TO SETTING PAGE ##### ##### JUMP PAGE TO SETTING PAGE #####
- platform: nextion - platform: nextion
@@ -964,7 +968,7 @@ display:
on_setup: on_setup:
then: then:
- lambda: id(disp1).send_command_printf("page 8"); - lambda: id(disp1).send_command_printf("page 8");
- lambda: id(disp1).set_component_text_printf("boot.esph_version", "%s", "3.2"); ### esphome-version ### - lambda: id(disp1).set_component_text_printf("boot.esph_version", "%s", "3.2.2"); ### esphome-version ###
- wait_until: - wait_until:
api.connected api.connected
- lambda: id(disp1).set_component_text_printf("boot.ip_addr", "%s", id(ip_address).state.c_str()); - lambda: id(disp1).set_component_text_printf("boot.ip_addr", "%s", id(ip_address).state.c_str());