diff --git a/ReleaseNotes.md b/ReleaseNotes.md index 44b7db9..01413be 100644 --- a/ReleaseNotes.md +++ b/ReleaseNotes.md @@ -71,6 +71,7 @@ Our community and support channels are open for any questions or assistance you - [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) +- [Page Fan with Oscillate Button](#page-fan-with-oscillate-button) ## Details of noteworthy changes ### Transition to ESP-IDF as Default Framework @@ -138,6 +139,15 @@ This intuitive addition allows for quick adjustments directly from the page Ligh This enhancement streamlines light management, making it more accessible and convenient for everyday use. +### Page Fan with Oscillate Button +The Fan page now features an oscillate button, making it easier to control your fan's oscillation settings. +This convenient update enables users to activate or deactivate the oscillation function with a single tap, directly from the Fan page itself. +It's designed to improve the user experience by offering a simple and effective control option. + +![Page Fan Oscillate Button](docs/pics/us_fan.png) + +This update simplifies fan operation, enhancing accessibility and usability for all users. + ## 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/us_fan.png b/docs/pics/us_fan.png new file mode 100644 index 0000000..7283ac6 Binary files /dev/null and b/docs/pics/us_fan.png differ diff --git a/esphome/nspanel_esphome_core.yaml b/esphome/nspanel_esphome_core.yaml index cbeb4c5..7bc495d 100644 --- a/esphome/nspanel_esphome_core.yaml +++ b/esphome/nspanel_esphome_core.yaml @@ -844,8 +844,6 @@ display: 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 @@ -853,6 +851,12 @@ display: break; } break; + case 22: // fan + switch (component_id) { + case 17: // bt_oscillate + ha_call_service->execute("fan.oscillate", "", "toggle", detailed_entity->state.c_str()); + break; + } } } diff --git a/hmi/dev/nspanel_eu_code/fan.txt b/hmi/dev/nspanel_eu_code/fan.txt index 6909a73..80c36db 100644 --- a/hmi/dev/nspanel_eu_code/fan.txt +++ b/hmi/dev/nspanel_eu_code/fan.txt @@ -17,6 +17,7 @@ Page fan page home } vis unavailable,0 + vis bt_oscillate,0 Postinitialize Event sendme @@ -75,6 +76,20 @@ Text unavailable Text : Max. Text Size : 1 +Text bt_oscillate + Attributes + ID : 17 + Scope : local + Dragging : 0 + Send Component ID : on press and release + Associated Keyboard: none + Text :  + Max. Text Size : 3 + + Events + Touch Release Event + bt_oscillate.pco=31 + Slider fanslider Attributes ID : 3 diff --git a/hmi/dev/nspanel_us_code/fan.txt b/hmi/dev/nspanel_us_code/fan.txt index 6909a73..80c36db 100644 --- a/hmi/dev/nspanel_us_code/fan.txt +++ b/hmi/dev/nspanel_us_code/fan.txt @@ -17,6 +17,7 @@ Page fan page home } vis unavailable,0 + vis bt_oscillate,0 Postinitialize Event sendme @@ -75,6 +76,20 @@ Text unavailable Text : Max. Text Size : 1 +Text bt_oscillate + Attributes + ID : 17 + Scope : local + Dragging : 0 + Send Component ID : on press and release + Associated Keyboard: none + Text :  + Max. Text Size : 3 + + Events + Touch Release Event + bt_oscillate.pco=31 + Slider fanslider Attributes ID : 3 diff --git a/hmi/dev/nspanel_us_land_code/fan.txt b/hmi/dev/nspanel_us_land_code/fan.txt index 6909a73..80c36db 100644 --- a/hmi/dev/nspanel_us_land_code/fan.txt +++ b/hmi/dev/nspanel_us_land_code/fan.txt @@ -17,6 +17,7 @@ Page fan page home } vis unavailable,0 + vis bt_oscillate,0 Postinitialize Event sendme @@ -75,6 +76,20 @@ Text unavailable Text : Max. Text Size : 1 +Text bt_oscillate + Attributes + ID : 17 + Scope : local + Dragging : 0 + Send Component ID : on press and release + Associated Keyboard: none + Text :  + Max. Text Size : 3 + + Events + Touch Release Event + bt_oscillate.pco=31 + Slider fanslider Attributes ID : 3 diff --git a/hmi/nspanel_eu.HMI b/hmi/nspanel_eu.HMI index c61ad16..2de6d51 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 df0c827..2edc0af 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 2043cf5..4af2592 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 3fc60fb..a58e840 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 eb4e749..7c94231 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 eb8fded..c83d8e4 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 087c782..0923dd3 100644 --- a/nspanel_blueprint.yaml +++ b/nspanel_blueprint.yaml @@ -7352,6 +7352,23 @@ action: target: entity_id: '{{ nspanel_event.entity }}' continue_on_error: true + - alias: "fan.oscillate" + conditions: + - '{{ nspanel_event.service == "fan.oscillate" }}' + sequence: + - variables: + action: > + {{ + (not state_attr(nspanel_event.entity, "oscillating") | default(true)) + if nspanel_event.value == "toggle" + else nspanel_event.value + }} + - service: fan.set_percentage + data: + oscillating: '{{ action }}' + target: + entity_id: '{{ nspanel_event.entity }}' + continue_on_error: true default: - service: '{{ nspanel_event.service }}' data: {"{{ nspanel_event.key }}":"{{ nspanel_event.value }}"} @@ -8316,7 +8333,19 @@ action: if percentage_step > 0 else 0 }} - - condition: '{{ fan.steps > 0 and fan.supported_features | bitwise_and(1) > 0 }}' + - if: '{{ fan.steps > 0 and fan.supported_features | bitwise_and(2) > 0 }}' # Oscillate + then: + - service: '{{ nspanel.service.component.text }}' + data: + id: bt_oscillate + txt: '{{ all_icons["autorenew-off"] if state_attr(fan_entity, "oscillating") | default(false) else all_icons["autorenew-on"] }}' + continue_on_error: true + - service: '{{ nspanel.service.component.visibility }}' + data: + id: fan.bt_oscillate + visible: true + continue_on_error: true + - condition: '{{ fan.steps > 0 and fan.supported_features | bitwise_and(1) > 0 }}' # Set speed - service: '{{ nspanel.service.component.value }}' data: id: fanslider