Ensure notification is shown

It possibly fixes #1751
This commit is contained in:
Edward Firmo
2024-01-31 17:43:42 +01:00
parent 31cd798f6f
commit f70e08cc8f
7 changed files with 13 additions and 10 deletions

View File

@@ -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") {

Binary file not shown.

View File

@@ -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

Binary file not shown.

View File

@@ -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

Binary file not shown.

Binary file not shown.