fix: fallback state
This commit is contained in:
@@ -419,13 +419,15 @@ binary_sensor:
|
||||
api.connected:
|
||||
then:
|
||||
- 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:
|
||||
condition:
|
||||
switch.is_on: relay_1
|
||||
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 #####
|
||||
@@ -445,13 +447,15 @@ binary_sensor:
|
||||
api.connected:
|
||||
then:
|
||||
- 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:
|
||||
condition:
|
||||
switch.is_on: relay_2
|
||||
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 #####
|
||||
- platform: nextion
|
||||
@@ -964,7 +968,7 @@ display:
|
||||
on_setup:
|
||||
then:
|
||||
- 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:
|
||||
api.connected
|
||||
- lambda: id(disp1).set_component_text_printf("boot.ip_addr", "%s", id(ip_address).state.c_str());
|
||||
|
||||
Reference in New Issue
Block a user