diff --git a/esphome/nspanel_esphome_core.yaml b/esphome/nspanel_esphome_core.yaml index 6987819..2968a3d 100644 --- a/esphome/nspanel_esphome_core.yaml +++ b/esphome/nspanel_esphome_core.yaml @@ -18,7 +18,7 @@ substitutions: temp_units: "°C" invalid_cooldown: "100ms" ##### DON'T CHANGE THIS ###### - version: "4.3.0b2" + version: "4.3.0b3" ############################## ##### External components ##### @@ -508,6 +508,7 @@ api: notification_label->publish_state(""); notification_text->publish_state(""); notification_unread->turn_off(); + set_component_visibility->execute("home.bt_notific", false); # Displays a notification message on the screen, useful for alerts or informational updates. - service: notification_show @@ -517,8 +518,7 @@ api: then: - lambda: |- if (!id(is_uploading_tft)) { - ESP_LOGV("service.notification_show", "Starting"); - + set_component_visibility->execute("home.bt_notific", true); goto_page->execute("notification"); disp1->set_component_text_printf("notification.notifi_label", "%s", label.c_str()); @@ -874,6 +874,25 @@ display: break; } break; + case 16: // notification + switch (component_id) { + case 7: // bt_accept + if (!touch_event) { // Release + notification_label->publish_state(""); + notification_text->publish_state(""); + notification_unread->turn_off(); + goto_page->execute("home"); + set_component_visibility->execute("home.bt_notific", false); + } + break; + case 8: // bt_clear + if (!touch_event) { // Release + notification_unread->turn_off(); + goto_page->execute("home"); + } + break; + } + break; case 22: // fan switch (component_id) { case 17: // bt_oscillate @@ -882,6 +901,7 @@ display: } break; } + break; } } @@ -1721,9 +1741,9 @@ text_sensor: detailed_entity->publish_state((id(is_embedded_thermostat)) ? "embedded_climate" : ""); disp1->set_component_value("climate.embedded", id(is_embedded_thermostat) ? 1 : 0); goto_page->execute("climate"); - } else if (page == "light" or page == "climate" or page == "notification") { // Generic event - auto ha_event = new esphome::api::CustomAPIDevice(); - ha_event->fire_homeassistant_event("esphome.nspanel_ha_blueprint", { + } else if (page == "light" or page == "climate") { // Generic event + esphome::api::CustomAPIDevice ha_event; + ha_event.fire_homeassistant_event("esphome.nspanel_ha_blueprint", { {"type", "generic"}, {"page", page}, {"event", event}, diff --git a/hmi/dev/nspanel_eu_code/boot.txt b/hmi/dev/nspanel_eu_code/boot.txt index 8e2230b..8800fe0 100644 --- a/hmi/dev/nspanel_eu_code/boot.txt +++ b/hmi/dev/nspanel_eu_code/boot.txt @@ -101,7 +101,7 @@ Text tft_version Dragging : 0 Send Component ID : on press and release Associated Keyboard: none - Text : 4.3.0b2 + Text : 4.3.0b3 Max. Text Size : 9 Text esph_version diff --git a/hmi/dev/nspanel_eu_code/notification.txt b/hmi/dev/nspanel_eu_code/notification.txt index ed2fbf2..b6a6951 100644 --- a/hmi/dev/nspanel_eu_code/notification.txt +++ b/hmi/dev/nspanel_eu_code/notification.txt @@ -80,16 +80,6 @@ Button bt_accept Text : î—  Max. Text Size : 3 - Events - Touch Release Event - lastclick.txt="{\"page\": \"notification\", \"component\": \"accept\", \"value\": \"release\"}" - printh 92 - prints "nspanelevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - Button bt_clear Attributes ID : 8 @@ -100,16 +90,6 @@ Button bt_clear Text : î…™ Max. Text Size : 10 - Events - Touch Release Event - lastclick.txt="{\"page\": \"notification\", \"component\": \"clear\", \"value\": \"release\"}" - printh 92 - prints "nspanelevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - Timer swipestore Attributes ID : 4 diff --git a/hmi/dev/nspanel_us_code/boot.txt b/hmi/dev/nspanel_us_code/boot.txt index d1e4b91..4c68974 100644 --- a/hmi/dev/nspanel_us_code/boot.txt +++ b/hmi/dev/nspanel_us_code/boot.txt @@ -101,7 +101,7 @@ Text tft_version Dragging : 0 Send Component ID : on press and release Associated Keyboard: none - Text : 4.3.0b2 + Text : 4.3.0b3 Max. Text Size : 9 Events diff --git a/hmi/dev/nspanel_us_code/notification.txt b/hmi/dev/nspanel_us_code/notification.txt index 99d93c7..731f0d7 100644 --- a/hmi/dev/nspanel_us_code/notification.txt +++ b/hmi/dev/nspanel_us_code/notification.txt @@ -80,16 +80,6 @@ Button bt_accept Text : î—  Max. Text Size : 3 - Events - Touch Release Event - lastclick.txt="{\"page\": \"notification\", \"component\": \"accept\", \"value\": \"release\"}" - printh 92 - prints "nspanelevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - Button bt_clear Attributes ID : 8 @@ -100,16 +90,6 @@ Button bt_clear Text : î…™ Max. Text Size : 3 - Events - Touch Release Event - lastclick.txt="{\"page\": \"notification\", \"component\": \"clear\", \"value\": \"release\"}" - printh 92 - prints "nspanelevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - Timer swipestore Attributes ID : 4 diff --git a/hmi/nspanel_eu.HMI b/hmi/nspanel_eu.HMI index 155a681..df52da7 100644 Binary files a/hmi/nspanel_eu.HMI and b/hmi/nspanel_eu.HMI differ diff --git a/hmi/nspanel_eu.tft b/hmi/nspanel_eu.tft index f2b2bb4..53a2041 100644 Binary files a/hmi/nspanel_eu.tft and b/hmi/nspanel_eu.tft differ diff --git a/hmi/nspanel_us.HMI b/hmi/nspanel_us.HMI index 1191a94..5d6ebe6 100644 Binary files a/hmi/nspanel_us.HMI and b/hmi/nspanel_us.HMI differ diff --git a/hmi/nspanel_us.tft b/hmi/nspanel_us.tft index 10e9ff8..ea4d924 100644 Binary files a/hmi/nspanel_us.tft and b/hmi/nspanel_us.tft differ diff --git a/nspanel_blueprint.yaml b/nspanel_blueprint.yaml index 677afc8..56b891c 100644 --- a/nspanel_blueprint.yaml +++ b/nspanel_blueprint.yaml @@ -10,7 +10,7 @@ blueprint: description: > # NSPanel Configuration via Blueprint: Complete UI-Based Setup - **Version**: v4.3.0b2 + **Version**: v4.3.0b3 This project enables comprehensive configuration of your NSPanel through a Blueprint featuring a user interface. @@ -3263,7 +3263,7 @@ trigger_variables: variables: ##### GENERAL ##### - blueprint_version: '4.3.0b2' + blueprint_version: '4.3.0b3' date_format_temp: !input 'date_format' # Avoid breaking change for existing users with legacy type format date_format: '{{ date_format_temp if date_format_temp not in ["%d.%m", "%d/%m", "%-d/%-m", "%-m/%-d"] else "%A, " ~ date_format_temp }}' @@ -3299,8 +3299,6 @@ variables: page: home: 'esphome.{{ nspanel_name }}_init_page_home' settings: 'esphome.{{ nspanel_name }}_init_page_settings' - notification: - clear: 'esphome.{{ nspanel_name }}_notification_clear' page: alarm: 'esphome.{{ nspanel_name }}_page_alarm' media_player: 'esphome.{{ nspanel_name }}_page_media_player' @@ -9888,37 +9886,6 @@ action: - *variable_entity - *entity_details_show - - alias: Show button - Notification clear - conditions: - - '{{ nspanel_event.page == pages.notification }}' - - '{{ nspanel_event.component == "clear" }}' - sequence: - - service: switch.turn_off - data: - entity_id: '{{ notification_unread }}' - continue_on_error: true - - service: '{{ nspanel.service.command }}' - data: - cmd: 'page {{ pages.home }}' - continue_on_error: true - - - alias: Show button - Notification accept - conditions: - - '{{ nspanel_event.page == pages.notification }}' - - '{{ nspanel_event.component == "accept" }}' - sequence: - - service: switch.turn_off - data: - entity_id: '{{ notification_unread }}' - continue_on_error: true - - service: '{{ nspanel.service.notification.clear }}' - data: {} - continue_on_error: true - - service: '{{ nspanel.service.command }}' - data: - cmd: 'page {{ pages.home }}' - continue_on_error: true - ##### BOOT NSPANEL - automation reload ##### - alias: Automation reloaded conditions: