diff --git a/advanced/esphome/nspanel_esphome_core.yaml b/advanced/esphome/nspanel_esphome_core.yaml index c227697..852063a 100644 --- a/advanced/esphome/nspanel_esphome_core.yaml +++ b/advanced/esphome/nspanel_esphome_core.yaml @@ -2053,11 +2053,11 @@ script: mode: restart then: - lambda: |- - if (current_page->state == "notification") disp1->goto_page("home"); notification_label->publish_state(""); notification_text->publish_state(""); notification_unread->turn_off(); refresh_notification->execute(); + if (current_page->state == "notification") disp1->goto_page("home"); - id: open_entity_settings_page mode: restart @@ -2274,6 +2274,7 @@ script: then: - script.execute: refresh_relays - script.execute: refresh_wifi_icon + - script.execute: refresh_notification - id: page_keyb_num mode: restart @@ -2407,7 +2408,9 @@ script: condition: - lambda: !lambda return id(setup_sequence_completed); - lambda: |- - bool is_notification = (notification_text->state.empty() and notification_label->state.empty()); + static const char *const TAG = "script.refresh_notification"; + bool is_notification = ((not notification_text->state.empty()) or (not notification_label->state.empty())); + ESP_LOGV(TAG, "Notification: %s", is_notification ? "True" : "False"); disp1->send_command_printf("is_notification=%i", is_notification ? 0 : 1); set_component_color->execute("home.bt_notific", notification_unread->state ? id(home_notify_icon_color_unread) : id(home_notify_icon_color_normal)); if (current_page->state == "home") { diff --git a/advanced/hmi/nspanel_eu.HMI b/advanced/hmi/nspanel_eu.HMI index 114e8b8..ecde12d 100644 Binary files a/advanced/hmi/nspanel_eu.HMI and b/advanced/hmi/nspanel_eu.HMI differ diff --git a/advanced/hmi/nspanel_eu_code/home.txt b/advanced/hmi/nspanel_eu_code/home.txt index a6a5668..998e7a9 100644 --- a/advanced/hmi/nspanel_eu_code/home.txt +++ b/advanced/hmi/nspanel_eu_code/home.txt @@ -290,7 +290,7 @@ Text wifi_icon Dragging : 0 Send Component ID : on press and release Associated Keyboard: none - Text : + Text :  Max. Text Size : 5 Events @@ -326,7 +326,7 @@ Text bt_notific Dragging : 0 Send Component ID : on press and release Associated Keyboard: none - Text : + Text :  Max. Text Size : 3 Events @@ -343,7 +343,7 @@ Text bt_qrcode Dragging : 0 Send Component ID : on press and release Associated Keyboard: none - Text : + Text :  Max. Text Size : 3 Events @@ -357,7 +357,7 @@ Text bt_entities Dragging : 0 Send Component ID : on press and release Associated Keyboard: none - Text : + Text :  Max. Text Size : 3 Events diff --git a/advanced/hmi/nspanel_us.HMI b/advanced/hmi/nspanel_us.HMI index f2a94dd..b5aa1fd 100644 Binary files a/advanced/hmi/nspanel_us.HMI and b/advanced/hmi/nspanel_us.HMI differ diff --git a/advanced/hmi/nspanel_us_code/home.txt b/advanced/hmi/nspanel_us_code/home.txt index a6a5668..998e7a9 100644 --- a/advanced/hmi/nspanel_us_code/home.txt +++ b/advanced/hmi/nspanel_us_code/home.txt @@ -290,7 +290,7 @@ Text wifi_icon Dragging : 0 Send Component ID : on press and release Associated Keyboard: none - Text : + Text :  Max. Text Size : 5 Events @@ -326,7 +326,7 @@ Text bt_notific Dragging : 0 Send Component ID : on press and release Associated Keyboard: none - Text : + Text :  Max. Text Size : 3 Events @@ -343,7 +343,7 @@ Text bt_qrcode Dragging : 0 Send Component ID : on press and release Associated Keyboard: none - Text : + Text :  Max. Text Size : 3 Events @@ -357,7 +357,7 @@ Text bt_entities Dragging : 0 Send Component ID : on press and release Associated Keyboard: none - Text : + Text :  Max. Text Size : 3 Events diff --git a/nspanel_eu.tft b/nspanel_eu.tft index 7df2a18..588f410 100644 Binary files a/nspanel_eu.tft and b/nspanel_eu.tft differ diff --git a/nspanel_us.tft b/nspanel_us.tft index 3e07aa8..0ef99d3 100644 Binary files a/nspanel_us.tft and b/nspanel_us.tft differ