From 70038014a20d913ea94d2f12a64d436f7d1fdc92 Mon Sep 17 00:00:00 2001 From: Blackymas Date: Sun, 26 Feb 2023 22:42:35 +0100 Subject: [PATCH] add Wifi icon and long press settings page --- nspanel_esphome.yaml | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/nspanel_esphome.yaml b/nspanel_esphome.yaml index 63df42a..0483015 100644 --- a/nspanel_esphome.yaml +++ b/nspanel_esphome.yaml @@ -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"); } -