diff --git a/ReleaseNotes.md b/ReleaseNotes.md index 7609539..ecec35c 100644 --- a/ReleaseNotes.md +++ b/ReleaseNotes.md @@ -34,10 +34,12 @@ Updates may come with changes on the blueprint inputs and we highly recommend yo ## Breaking changes 1. Service `esphome.xxxxx_set_component_color` parameter `background` is deprecated. +2. Due to the additional custom button, the other buttons on home page changed it's position slightly   ## Overview of noteworthy changes 1. Standardized entity's icons +2. Additional custom button on Home page   ## Details of noteworthy changes @@ -46,7 +48,8 @@ Updates may come with changes on the blueprint inputs and we highly recommend yo The engine for defining the icons to be shown and it's color was standardize between all the pages, so now you may see a more consistent User's Interface.   -### 2. +### 2. Additional custom button on Home page +It's that simple, now you have 4 buttons where used to be 3. 😉   ## Next topics we are currently working on @@ -58,6 +61,8 @@ See here: https://github.com/Blackymas/NSPanel_HA_Blueprint/labels/roadmap ## New Contributors ## Previous releases +- [v4.1.4 - Support to Home Assistant 2023.12.0](https://github.com/Blackymas/NSPanel_HA_Blueprint/releases/tag/v4.1.4) +- [v4.1.3 - Bug fixes](https://github.com/Blackymas/NSPanel_HA_Blueprint/releases/tag/v4.1.3) - [v4.1.2 - Bug fixes and minor enhancements](https://github.com/Blackymas/NSPanel_HA_Blueprint/releases/tag/v4.1.2) - [v4.1.1 - UI Enhancements and Reintroduction of `play_rtttl` Service](https://github.com/Blackymas/NSPanel_HA_Blueprint/releases/tag/v4.1.1) - [v4.1 - Easier TFT transfer](https://github.com/Blackymas/NSPanel_HA_Blueprint/releases/tag/v4.1) diff --git a/advanced/esphome/nspanel_esphome_core.yaml b/advanced/esphome/nspanel_esphome_core.yaml index af5d858..ad85d02 100644 --- a/advanced/esphome/nspanel_esphome_core.yaml +++ b/advanced/esphome/nspanel_esphome_core.yaml @@ -498,6 +498,7 @@ api: bg: int[] icon: string icon_color: int[] + icon_font: int bri: string bri_color: int[] label: string @@ -510,6 +511,7 @@ api: std::string btntext = id.c_str() + std::string("text"); std::string btnbri = id.c_str() + std::string("bri"); disp1->send_command_printf("%spic.pic=%" PRIu32, id.c_str(), pic); + disp1->send_command_printf("%sicon.font=%" PRIu32, id.c_str(), icon_font); set_component_color->execute(btnicon.c_str(), icon_color, bg); set_component_color->execute(btntext.c_str(), label_color, bg); set_component_color->execute(btnbri.c_str(), bri_color, bg); diff --git a/advanced/hmi/nspanel_eu.HMI b/advanced/hmi/nspanel_eu.HMI index 201e11a..c0df115 100644 Binary files a/advanced/hmi/nspanel_eu.HMI and b/advanced/hmi/nspanel_eu.HMI differ diff --git a/advanced/hmi/nspanel_eu_code/home.txt b/advanced/hmi/nspanel_eu_code/home.txt index d4e3776..056d101 100644 --- a/advanced/hmi/nspanel_eu_code/home.txt +++ b/advanced/hmi/nspanel_eu_code/home.txt @@ -436,6 +436,34 @@ Text button03 printh FF FF FF } +Text button04 + Attributes + ID : 46 + Scope : global + Dragging : 0 + Send Component ID : on press and release + Associated Keyboard: none + Text : + Max. Text Size : 3 + + Events + Touch Press Event + click_comp.txt="button04" + click_timer.en=1 + + Touch Release Event + if(click_timer.en==1) + { + click_timer.en=0 + lastclick.txt="{\"page\": \"home\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" + printh 92 + prints "localevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + } + Picture weather Attributes ID : 7 diff --git a/advanced/hmi/nspanel_us.HMI b/advanced/hmi/nspanel_us.HMI index 4646cbd..c4d33f2 100644 Binary files a/advanced/hmi/nspanel_us.HMI and b/advanced/hmi/nspanel_us.HMI differ diff --git a/advanced/hmi/nspanel_us_code/home.txt b/advanced/hmi/nspanel_us_code/home.txt index 8cda3e2..857009c 100644 --- a/advanced/hmi/nspanel_us_code/home.txt +++ b/advanced/hmi/nspanel_us_code/home.txt @@ -436,6 +436,34 @@ Text button03 printh FF FF FF } +Text button04 + Attributes + ID : 46 + Scope : global + Dragging : 0 + Send Component ID : on press and release + Associated Keyboard: none + Text : + Max. Text Size : 3 + + Events + Touch Press Event + click_comp.txt="button04" + click_timer.en=1 + + Touch Release Event + if(click_timer.en==1) + { + click_timer.en=0 + lastclick.txt="{\"page\": \"home\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" + printh 92 + prints "localevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + } + Picture weather Attributes ID : 7 diff --git a/advanced/hmi/nspanel_us_land.HMI b/advanced/hmi/nspanel_us_land.HMI index 1d30ea8..f6f408d 100644 Binary files a/advanced/hmi/nspanel_us_land.HMI and b/advanced/hmi/nspanel_us_land.HMI differ diff --git a/advanced/hmi/nspanel_us_land_code/home.txt b/advanced/hmi/nspanel_us_land_code/home.txt index d4e3776..056d101 100644 --- a/advanced/hmi/nspanel_us_land_code/home.txt +++ b/advanced/hmi/nspanel_us_land_code/home.txt @@ -436,6 +436,34 @@ Text button03 printh FF FF FF } +Text button04 + Attributes + ID : 46 + Scope : global + Dragging : 0 + Send Component ID : on press and release + Associated Keyboard: none + Text : + Max. Text Size : 3 + + Events + Touch Press Event + click_comp.txt="button04" + click_timer.en=1 + + Touch Release Event + if(click_timer.en==1) + { + click_timer.en=0 + lastclick.txt="{\"page\": \"home\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" + printh 92 + prints "localevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + } + Picture weather Attributes ID : 7 diff --git a/nspanel_blueprint.yaml b/nspanel_blueprint.yaml index a2b0b3e..ce0afdf 100644 --- a/nspanel_blueprint.yaml +++ b/nspanel_blueprint.yaml @@ -599,6 +599,25 @@ blueprint: *Icon which should be displayed (Default - an icon matching the entity will be set automatically)* default: [] selector: *icon-selector + ## Page Home - Custom button 04 + home_custom_button04: + name: Custom button 04 - ENTITY (Optional) + description: > + *HOME page* + + *Entity which should be switched (ONLY light | switch | cover | input_boolean | automation | button | input_button | scene | script | fan | climate | media_player)* + + *Entities with supported advanced settings will open it's settings page, all other entities will execute the action or toggle when clicked.* + default: [] + selector: *home-custom-button-entity-selector + home_custom_button04_icon: + name: Custom button 04 - ICON (Optional) + description: > + *HOME page* + + *Icon which should be displayed (Default - an icon matching the entity will be set automatically)* + default: [] + selector: *icon-selector ##### Alarm Control Panel - Page Alarm ##### PLACEHOLDER ###################################################################### @@ -6266,6 +6285,12 @@ trigger: event_data: entity_id: !input 'home_custom_button03' id: home_custom_buttons + ##### Custom button 04 - Trigger 'home_custom_buttons' ##### + - platform: event + event_type: state_changed + event_data: + entity_id: !input 'home_custom_button04' + id: home_custom_buttons ##### Trigger - Relays - State change ################################################################################################################# @@ -7110,6 +7135,9 @@ action: - entity: !input home_custom_button03 icon: !input home_custom_button03_icon component: button03 + - entity: !input home_custom_button04 + icon: !input home_custom_button04_icon + component: button04 - repeat: for_each: '{{ home_page_custom_buttons }}' sequence: @@ -7753,6 +7781,7 @@ action: bg: '{{ [ btn_bg ] if is_number(btn_bg) else btn_bg }}' icon: '{{ btn_icon }}' icon_color: '{{ [ btn_icon_font ] if is_number(btn_icon_font) else btn_icon_font }}' + icon_font: 8 bri: '{{ btn_bri_txt }}' bri_color: '{{ [ btn_bri_font ] if is_number(btn_bri_font) else btn_bri_font }}' label: '{{ btn_label }}' @@ -7774,6 +7803,7 @@ action: bg: '{{ nextion.color.grey_dark }}' icon: '{{ btn_icon }}' icon_color: '{{ nextion.color.grey_light }}' + icon_font: 8 bri: '{{ btn_bri_txt }}' bri_color: '{{ [ btn_bri_font ] if is_number(btn_bri_font) else btn_bri_font }}' label: '{{ btn_label }}' diff --git a/nspanel_eu.tft b/nspanel_eu.tft index c2f65cc..49adfd6 100644 Binary files a/nspanel_eu.tft and b/nspanel_eu.tft differ diff --git a/nspanel_us.tft b/nspanel_us.tft index 060e879..94cbdce 100644 Binary files a/nspanel_us.tft and b/nspanel_us.tft differ diff --git a/nspanel_us_land.tft b/nspanel_us_land.tft index 8875fe8..804fb1a 100644 Binary files a/nspanel_us_land.tft and b/nspanel_us_land.tft differ