@@ -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") {
|
||||
|
||||
Reference in New Issue
Block a user