diff --git a/ReleaseNotes.md b/ReleaseNotes.md index c965124..38473ab 100644 --- a/ReleaseNotes.md +++ b/ReleaseNotes.md @@ -73,7 +73,7 @@ Our community and support channels are open for any questions or assistance you - [Transition to ESP-IDF as Default Framework](#transition-to-esp-idf-as-default-framework) - [New API documentation](#new-api-documentation) - [Selectable font size for screensaver time display](#selectable-font-size-for-screensaver-time-display) -- [Hardware buttons bars visible on all pages](#hardware-buttons-bars-visible-on-all-pages) +- [Enhanced Visibility of Hardware Button Bars Across Pages](#enhanced-visibility-of-hardware-button-bars-across-pages) - [User-Defined Decimal Separator](#user-defined-decimal-separator) - [Page Light with Power Button](#page-light-with-power-button) - [Page Fan with Oscillate Button](#page-fan-with-oscillate-button) @@ -126,10 +126,17 @@ Now you can chose the font size for your clock display in the screen saver. Ther > Please select a differnt font in that case. -### Hardware buttons bars visible on all pages -Bars indicating statuses of entities controlled by hardware buttons are now visible on all pages, including screensaver. -Color customization for these bars is also available. -![Image](docs/pics/ha_blueprint_hw_buttons_colors.png) +### Enhanced Visibility of Hardware Button Bars Across Pages +The hardware button bars, which display the status of entities linked to physical buttons, are now configurable to appear across all pages, +including the screensaver, providing a constant visual reference to your system's status. +This update introduces a new setting within the blueprint, allowing you to customize the visibility of these bars according to your preferences. +Whether you need continuous monitoring on certain pages or want to maintain a cleaner look on others, this flexibility enhances your control. + +Additionally, we've introduced the option to personalize the color of these bars, offering further customization to match your panel's aesthetic or to signify different statuses at a glance. + +![Hardware Button Bars Color Customization](docs/pics/ha_blueprint_hw_buttons_colors.png) + +This feature enhances the NSPanel's functionality by ensuring important status indicators are always within view, tailored precisely to how you use your smart home. ### User-Defined Decimal Separator You can now select the decimal separator for displaying numbers on your NSPanel. diff --git a/esphome/nspanel_esphome_core.yaml b/esphome/nspanel_esphome_core.yaml index 0d3a077..1e81a2e 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.3dev1" + version: "4.3dev2" ############################## ##### External components ##### @@ -339,6 +339,7 @@ api: relay2_fallback: bool # Fallback state for Relay 2 in case of communication loss. button_left: bool # Enable/disable left button status visualization. button_right: bool # Enable/disable right button status visualization. + button_bar_pages: int # As uint representing the list of pages where the buttons bars will be visible button_bar_color_on: int[] # RGB color array for the hardware button bar when the status is `On`. button_bar_color_off: int[] # RGB color array for the hardware button bar when the status is `Off`. embedded_climate: bool # Indicates if climate control is integrated. @@ -384,6 +385,7 @@ api: refresh_relays->execute(); // Buttons bars settings + id(buttons_bars_pages) = button_bar_pages; update_bitwise_setting(id(buttons_settings), button_left, ButtonSettings::ButtonLeft_Enabled); update_bitwise_setting(id(buttons_settings), button_right, ButtonSettings::ButtonRight_Enabled); @@ -910,6 +912,11 @@ globals: restore_value: true initial_value: '10597' + - id: buttons_bars_pages + type: uint32_t + restore_value: true + initial_value: '1' + ####### Relay settings ####### # Bit # Settings # # 0 # Relay 1 - Local # @@ -2383,7 +2390,7 @@ script: mode: restart then: - lambda: |- - if (!id(is_uploading_tft)) { + if (!id(is_uploading_tft) and ((id(buttons_bars_pages) & (1 << get_page_id(current_page->state.c_str()))) != 0)) { switch (int(display_mode->state)) { case 1: // EU model if (id(buttons_settings) & nspanel_ha_blueprint::ButtonSettings::ButtonLeft_Enabled) { // Left button diff --git a/hmi/dev/nspanel_eu_code/boot.txt b/hmi/dev/nspanel_eu_code/boot.txt index 6f83888..8a940d8 100644 --- a/hmi/dev/nspanel_eu_code/boot.txt +++ b/hmi/dev/nspanel_eu_code/boot.txt @@ -103,7 +103,7 @@ Text tft_version Dragging : 0 Send Component ID : on press and release Associated Keyboard: none - Text : 4.3dev1 + Text : 4.3dev2 Max. Text Size : 9 Text esph_version diff --git a/hmi/dev/nspanel_us_code/boot.txt b/hmi/dev/nspanel_us_code/boot.txt index 35acd75..ad86552 100644 --- a/hmi/dev/nspanel_us_code/boot.txt +++ b/hmi/dev/nspanel_us_code/boot.txt @@ -103,7 +103,7 @@ Text tft_version Dragging : 0 Send Component ID : on press and release Associated Keyboard: none - Text : 4.3dev1 + Text : 4.3dev2 Max. Text Size : 9 Events diff --git a/hmi/dev/nspanel_us_land_code/boot.txt b/hmi/dev/nspanel_us_land_code/boot.txt index 6f83888..8a940d8 100644 --- a/hmi/dev/nspanel_us_land_code/boot.txt +++ b/hmi/dev/nspanel_us_land_code/boot.txt @@ -103,7 +103,7 @@ Text tft_version Dragging : 0 Send Component ID : on press and release Associated Keyboard: none - Text : 4.3dev1 + Text : 4.3dev2 Max. Text Size : 9 Text esph_version diff --git a/hmi/nspanel_eu.HMI b/hmi/nspanel_eu.HMI index a730225..0b078e6 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 e43c492..a86631c 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 dfc2992..448bb71 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 f018277..7abc10a 100644 Binary files a/hmi/nspanel_us.tft and b/hmi/nspanel_us.tft differ diff --git a/hmi/nspanel_us_land.HMI b/hmi/nspanel_us_land.HMI index ba59fd0..53a8ab7 100644 Binary files a/hmi/nspanel_us_land.HMI and b/hmi/nspanel_us_land.HMI differ diff --git a/hmi/nspanel_us_land.tft b/hmi/nspanel_us_land.tft index b35f411..8f289b2 100644 Binary files a/hmi/nspanel_us_land.tft and b/hmi/nspanel_us_land.tft differ diff --git a/nspanel_blueprint.yaml b/nspanel_blueprint.yaml index ae4258e..efa572e 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.3dev1 + **Version**: v4.3dev2 This project enables comprehensive configuration of your NSPanel through a Blueprint featuring a user interface. @@ -758,13 +758,59 @@ blueprint: default: ' ' selector: *placeholder-selector ##### PLACEHOLDER ###################################################################### + hw_buttons_bar_pages: + name: Hardware Buttons - Visibility Pages + description: > + Choose the pages where the bars, indicating the status of entities linked to hardware buttons, will be displayed. + + ***Attention!** Overlapping of button bars with other components may occur on some pages. Please proceed with caution.* + default: + - '1' + selector: + select: + multiple: true + options: + - label: "Home (default)" + value: '1' + - label: "Buttons pages" + value: '61440' + - label: "Entities pages" + value: '3932160' + - label: "Notification page" + value: '65536' + - label: "QR code page" + value: '131072' + - label: "Screen saver (sleep) page" + value: '512' + - label: "Settings page" + value: '128' + - label: "Utilities page" + value: '134217728' + - label: "Weather pages" + value: '62' + - label: "Alarm control panel page" + value: '8388608' + - label: "Climate page" + value: '64' + - label: "Cover page" + value: '2048' + - label: "Fan page" + value: '4194304' + - label: "Light page" + value: '1024' + - label: "Media player page" + value: '33554432' + - label: "Confirm pop-up page" + value: '67108864' + - label: "Keyboard pop-up page" + value: '16777216' hw_buttons_bar_color_on: - name: Hardware buttons - Bar color when `On` (Optional) + name: Hardware Buttons - Bar color when `On` (Optional) description: "Choose a color for the button's bars when the controlled entity is `On`." default: [31, 169, 255] selector: *color_selector hw_buttons_bar_color_off: - name: Hardware buttons - Bar color when `Off` (Optional) + name: Hardware baby-carriageuttons - Bar color when `Off` (Optional) description: "Choose a color for the button's bars when the controlled entity is `Off`." default: [44, 44, 44] selector: *color_selector @@ -3067,7 +3113,7 @@ trigger_variables: variables: ##### GENERAL ##### - blueprint_version: '4.3dev1' + blueprint_version: '4.3dev2' 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 }}' @@ -7026,6 +7072,7 @@ action: icon_color: '{{ None }}' name: '{{ None }}' - &variable_entity + alias: Variable Entity variables: entity_id_valid: '{{ entity_id is defined and entity_id is string and entity_id.split(".") | count == 2 }}' entity_state: '{{ states(entity_id) | default("unknown") if entity_id_valid }}' @@ -7301,6 +7348,8 @@ action: - variables: climate_friendly_name: '{{ state_attr(climate, "friendly_name") if climate is string and climate is match "climate." else "" }}' + hw_buttons_bar_pages: !input hw_buttons_bar_pages + - service: '{{ nspanel.service.init.hardware }}' data: relay1_local_control: '{{ hardware.buttons.left.entity == relay01_entity }}' @@ -7313,6 +7362,7 @@ action: relay2_fallback: !input relay_2_local_fallback button_left: '{{ hardware.buttons.left.entity is defined and hardware.buttons.left.entity is string and hardware.buttons.left.entity.split(".") | count == 2 }}' button_right: '{{ hardware.buttons.right.entity is defined and hardware.buttons.right.entity is string and hardware.buttons.right.entity.split(".") | count == 2 }}' + button_bar_pages: '{{ hw_buttons_bar_pages | map("int") | sum }}' button_bar_color_on: !input hw_buttons_bar_color_on button_bar_color_off: !input hw_buttons_bar_color_off embedded_climate: '{{ climate == thermostat_embedded }}' @@ -9157,14 +9207,21 @@ action: }} sequence: &refresh_page_utilities_group - condition: '{{ repeat.item.icon is defined and repeat.item.icon is string and repeat.item.icon.split("mdi:") | count == 2 }}' - - variables: + - alias: Var aux 1 + variables: icon_code: '{{ repeat.item.icon.split("mdi:")[1] if repeat.item.icon is string and repeat.item.icon.split("mdi:") | count == 2 }}' + - alias: Var aux 2 + variables: entity_id: '{{ repeat.item.value1 }}' + - alias: Var aux 3 + variables: unit_of_measurement: '{{ state_attr(entity_id, "unit_of_measurement") | default("") }}' - *variable_entity - - variables: + - alias: Var Value with units 1 + variables: value_temp: *value_with_unit_and_translations - - service: '{{ nspanel.service.value }}' + - alias: Service value 1 + service: '{{ nspanel.service.value }}' data: id: 'utilities.{{ repeat.item.name }}' icon: '{{ all_icons[icon_code] if icon_code in all_icons else "" }}' @@ -9175,13 +9232,16 @@ action: continue_on_error: true - if: '{{ repeat.item.value2 is defined and repeat.item.value2 is string and repeat.item.value2.split(".") | count == 2 }}' then: - - variables: + - alias: Var entity prep 2 + variables: entity_id: '{{ repeat.item.value2 }}' unit_of_measurement: '{{ state_attr(entity_id, "unit_of_measurement") | default("") }}' - *variable_entity - - variables: + - alias: Var Value with units 1 + variables: value_temp: *value_with_unit_and_translations - - service: '{{ nspanel.service.value }}' + - alias: Service value 2 + service: '{{ nspanel.service.value }}' data: id: 'utilities.{{ repeat.item.name }}b' icon: '' @@ -9190,7 +9250,8 @@ action: value: *value_with_unit_and_translations value_color: '{{ repeat.item.color }}' continue_on_error: true - - variables: + - alias: Var group_components + variables: group_components: > {% set base_items = [ repeat.item.name, @@ -9204,7 +9265,8 @@ action: {% set extra_items = [] %} {% endif %} {{ base_items + extra_items }} - - service: '{{ nspanel.service.component.visibility }}' + - alias: Service visibility + service: '{{ nspanel.service.component.visibility }}' data: ids: '{{ group_components }}' visible: true @@ -9419,7 +9481,7 @@ action: else "Unknown" }} - - Blueprint (expected): {{ blueprint_version }} + - Blueprint (installed): {{ blueprint_version }} continue_on_error: true else: - if: @@ -9446,7 +9508,16 @@ action: - ESPHome: {{ nspanel_event.esphome }} - - Blueprint: {{ nspanel_event.blueprint }} (expected {{ blueprint_version }}) + - Blueprint (reported by ESPHome): {{ + nspanel_event.blueprint + if + nspanel_event.blueprint is defined and + nspanel_event.blueprint is string and + nspanel_event.blueprint | length > 0 + else "Unknown" + }} + + - Blueprint (installed): {{ blueprint_version }} continue_on_error: true ##### Other events #####