add Wifi icon and long press settings page
This commit is contained in:
@@ -407,6 +407,18 @@ binary_sensor:
|
||||
then:
|
||||
- lambda: id(disp1).send_command_printf("home.icon_top_02.pic=106");
|
||||
|
||||
##### JUMP PAGE TO SETTING PAGE #####
|
||||
- platform: nextion
|
||||
name: $device_name setting page
|
||||
page_id: 0
|
||||
component_id: 53
|
||||
internal: true
|
||||
on_multi_click:
|
||||
- timing:
|
||||
- ON for at least 1s #LONG Press
|
||||
then:
|
||||
- lambda: 'id(disp1).send_command_printf("page settings");'
|
||||
|
||||
##### Restart NSPanel Button - Setting Page #####
|
||||
- platform: nextion
|
||||
name: ${device_name} Restart
|
||||
@@ -458,6 +470,14 @@ sensor:
|
||||
- platform: wifi_signal
|
||||
name: ${device_name} RSSI
|
||||
update_interval: 60s
|
||||
on_value:
|
||||
- if:
|
||||
condition:
|
||||
wifi.connected:
|
||||
then:
|
||||
- lambda: id(disp1).set_component_text_printf("home.wifi_icon", "%s", "\U0000E5A8");
|
||||
else:
|
||||
- lambda: id(disp1).set_component_text_printf("home.wifi_icon", "%s", "\U00000E27");
|
||||
|
||||
##### INTERNAL TEMPERATURE SENSOR, ADC VALUE #####
|
||||
- platform: adc
|
||||
@@ -898,7 +918,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.1.1"); ### esphome-version ###
|
||||
- lambda: id(disp1).set_component_text_printf("boot.esph_version", "%s", "3.2"); ### esphome-version ###
|
||||
- wait_until:
|
||||
api.connected
|
||||
- lambda: id(disp1).set_component_text_printf("boot.ip_addr", "%s", id(ip_address).state.c_str());
|
||||
@@ -936,4 +956,3 @@ script:
|
||||
ESP_LOGD("nspanel", "timer->home");
|
||||
id(disp1).send_command_printf("page 0");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user