diff --git a/ReleaseNotes.md b/ReleaseNotes.md index e39c236..44b7db9 100644 --- a/ReleaseNotes.md +++ b/ReleaseNotes.md @@ -70,6 +70,7 @@ Our community and support channels are open for any questions or assistance you - [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) - [User-Defined Decimal Separator](#user-defined-decimal-separator) +- [Page Light with Power Button](#page-light-with-power-button) ## Details of noteworthy changes ### Transition to ESP-IDF as Default Framework @@ -129,6 +130,14 @@ Simply go to the settings to choose between the dot (.) and comma (,) as your de This update aims to enhance the flexibility and usability of the NSPanel interface for users worldwide. +### Page Light with Power Button +The page Light has been updated to include a power button, simplifying the process of toggling your light on or off. +This intuitive addition allows for quick adjustments directly from the page Light, enhancing the user experience by providing a straightforward control mechanism. + +![Page Light Power Button](docs/pics/eu_light.png) + +This enhancement streamlines light management, making it more accessible and convenient for everyday use. + ## Support For support or more information about this update, visit our [GitHub repository](https://github.com/Blackymas/NSPanel_HA_Blueprint) diff --git a/docs/pics/eu_light.png b/docs/pics/eu_light.png new file mode 100644 index 0000000..b6fe954 Binary files /dev/null and b/docs/pics/eu_light.png differ diff --git a/esphome/nspanel_esphome_core.yaml b/esphome/nspanel_esphome_core.yaml index fc730fb..cbeb4c5 100644 --- a/esphome/nspanel_esphome_core.yaml +++ b/esphome/nspanel_esphome_core.yaml @@ -838,9 +838,23 @@ display: page_changed->execute(page_names[x]); } } + on_touch: lambda: |- - timer_reset_all->execute(page_names[page_id]); + if (not id(is_uploading_tft)) { + timer_reset_all->execute(page_names[page_id]); + switch (page_id) { + case 0: // home + break; + case 10: // light + switch (component_id) { + case 34: // power_button + ha_call_service->execute("light.toggle", "", "", detailed_entity->state.c_str()); + break; + } + break; + } + } ##### START - GLOBALS CONFIGURATION ##### globals: diff --git a/hmi/dev/nspanel_eu_code/light.txt b/hmi/dev/nspanel_eu_code/light.txt index 5a1d342..da41027 100644 --- a/hmi/dev/nspanel_eu_code/light.txt +++ b/hmi/dev/nspanel_eu_code/light.txt @@ -169,6 +169,20 @@ Text unavailable Text : Max. Text Size : 1 +Text power_button + Attributes + ID : 34 + Scope : local + Dragging : 0 + Send Component ID : on press and release + Associated Keyboard: none + Text :  + Max. Text Size : 3 + + Events + Touch Release Event + power_button.pco=31 + Picture light_button Attributes ID : 8 diff --git a/hmi/dev/nspanel_us_code/light.txt b/hmi/dev/nspanel_us_code/light.txt index 25a940f..ca91503 100644 --- a/hmi/dev/nspanel_us_code/light.txt +++ b/hmi/dev/nspanel_us_code/light.txt @@ -169,6 +169,20 @@ Text unavailable Text : Max. Text Size : 1 +Text power_button + Attributes + ID : 34 + Scope : local + Dragging : 0 + Send Component ID : on press and release + Associated Keyboard: none + Text :  + Max. Text Size : 3 + + Events + Touch Release Event + power_button.pco=31 + Picture light_button Attributes ID : 8 diff --git a/hmi/dev/nspanel_us_land_code/light.txt b/hmi/dev/nspanel_us_land_code/light.txt index 5a1d342..da41027 100644 --- a/hmi/dev/nspanel_us_land_code/light.txt +++ b/hmi/dev/nspanel_us_land_code/light.txt @@ -169,6 +169,20 @@ Text unavailable Text : Max. Text Size : 1 +Text power_button + Attributes + ID : 34 + Scope : local + Dragging : 0 + Send Component ID : on press and release + Associated Keyboard: none + Text :  + Max. Text Size : 3 + + Events + Touch Release Event + power_button.pco=31 + Picture light_button Attributes ID : 8 diff --git a/hmi/nspanel_eu.HMI b/hmi/nspanel_eu.HMI index 5d11152..c61ad16 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 2750eb9..df0c827 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 f7e31aa..2043cf5 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 64afc8f..3fc60fb 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 ee7fb82..eb4e749 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 0aee851..eb8fded 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 8ac2e3f..087c782 100644 --- a/nspanel_blueprint.yaml +++ b/nspanel_blueprint.yaml @@ -3469,7 +3469,7 @@ variables: text: 'esphome.{{ nspanel_name }}_component_text' value: 'esphome.{{ nspanel_name }}_component_val' visibility: 'esphome.{{ nspanel_name }}_component_visibility' - detailed_entity: 'esphome.{{ nspanel_name }}_entity_details_show' + entity_details_show: 'esphome.{{ nspanel_name }}_entity_details_show' hw_button_state: 'esphome.{{ nspanel_name }}_hw_button_state' icon: 'esphome.{{ nspanel_name }}_icon' init: @@ -8137,6 +8137,11 @@ action: data: cmd: tempslider.maxval={{ max_mireds }} continue_on_error: true + - service: '{{ nspanel.service.component.color }}' + data: + id: power_button + color: [192, 192, 192] + continue_on_error: true - service: '{{ nspanel.service.component.visibility }}' data: id: temp_button @@ -9418,7 +9423,7 @@ action: - variables: back_page: '{{ page.home }}' - &entity_details_show - service: '{{ nspanel.service.page.entity_details_show }}' + service: '{{ nspanel.service.entity_details_show }}' data: entity: '{{ "embedded_climate" if entity_id == thermostat_embedded else entity_id }}' back_page: '{{ back_page }}'