diff --git a/docs/api.md b/docs/api.md index 97646a3..c6d88c4 100644 --- a/docs/api.md +++ b/docs/api.md @@ -413,7 +413,6 @@ for the notification button. Icon codepoint from [HASwitchPlate Material Design Icons](https://htmlpreview.github.io/?https://github.com/jobr99/Generate-HASP-Fonts/blob/master/cheatsheet.html) for the QR code button. - `qrcode_icon_color` (int[]): RGB color array for the QR code button icon. -- `entities_pages` (bool): Flag indicating whether the entities page button is enabled. - `entities_pages_icon` (string): Icon codepoint from [HASwitchPlate Material Design Icons](https://htmlpreview.github.io/?https://github.com/jobr99/Generate-HASP-Fonts/blob/master/cheatsheet.html) for the entities page button. @@ -436,7 +435,6 @@ data: qrcode: true qrcode_icon: "\uE432" # Example for mdi:qrcode-scan qrcode_icon_color: [0, 255, 0] # Green - entities_pages: true entities_pages_icon: "\uEDCF" # Example for mdi:format-list-bulleted-square entities_pages_icon_color: [0, 0, 255] # Blue outdoor_temp_font: 5 diff --git a/esphome/nspanel_esphome_core.yaml b/esphome/nspanel_esphome_core.yaml index e41789f..4204569 100644 --- a/esphome/nspanel_esphome_core.yaml +++ b/esphome/nspanel_esphome_core.yaml @@ -412,7 +412,6 @@ api: qrcode: bool # Enable/disable flag for QR code button display. qrcode_icon: string # Icon codepoint for QR code button, sourced from HASwitchPlate Material Design Icons. qrcode_icon_color: int[] # RGB color array for QR code button icon. - entities_pages: bool # Enable/disable flag for entities page button display. entities_pages_icon: string # Icon codepoint for entities page button, sourced from HASwitchPlate Material Design Icons. entities_pages_icon_color: int[] # RGB color array for entities page button icon. outdoor_temp_font: int # Font Id for outdoor temperature indication on the "Home" page. diff --git a/hmi/dev/nspanel_eu_code/Program.s.txt b/hmi/dev/nspanel_eu_code/Program.s.txt index 23379dd..a55af3f 100644 --- a/hmi/dev/nspanel_eu_code/Program.s.txt +++ b/hmi/dev/nspanel_eu_code/Program.s.txt @@ -4,12 +4,12 @@ Program.s int r=0,g=0,b=0 int h=0,s=0,v=0 int p=0,q=0,t=0,f=0 - int is_buttonpage01=1, is_buttonpage02=1, is_buttonpage03=1, is_buttonpage04=1 - int is_entitypage01=1, is_entitypage02=1, is_entitypage03=1, is_entitypage04=1 + int is_buttonpage01=0, is_buttonpage02=0, is_buttonpage03=0, is_buttonpage04=0 + int is_entitypage01=0, is_entitypage02=0, is_entitypage03=0, is_entitypage04=0 int back_page_id=0 int dimdelta=0 int api=0 // 0 = disconnected from HA, 1 = connected to HA - int is_entities=0,is_qrcode=0,is_notification=0 + int is_qrcode=0,is_notification=0 int brightness=100,brightness_dim=40,brightness_sleep=0 int display_mode=1 // 1 = EU, 2 = US, 3 = US landscape, 4 = blank int charset=1 // 1 = International (original), 2 = CJK diff --git a/hmi/dev/nspanel_eu_code/home.txt b/hmi/dev/nspanel_eu_code/home.txt index e8109d7..7330af0 100644 --- a/hmi/dev/nspanel_eu_code/home.txt +++ b/hmi/dev/nspanel_eu_code/home.txt @@ -13,9 +13,15 @@ Page home Events Preinitialize Event back_page_id=0 + if(is_entitypage01>0||is_entitypage02>0||is_entitypage03>0||is_entitypage04>0) + { + vis bt_entities,1 + }else + { + vis bt_entities,0 + } vis bt_notific,is_notification vis bt_qrcode,is_qrcode - vis bt_entities,is_entities if(display_mode==3) { vis left_bt_text,0 @@ -364,7 +370,22 @@ Text bt_entities Touch Release Event if(api==1) { - page entitypage01 + if(is_entitypage01>0) + { + page entitypage01 + }else if(is_entitypage02>0) + { + page entitypage02 + }else if(is_entitypage03>0) + { + page entitypage03 + }else if(is_entitypage04>0) + { + page entitypage04 + }else + { + vis bt_entities,0 + } } Text button07 diff --git a/hmi/dev/nspanel_us_code/Program.s.txt b/hmi/dev/nspanel_us_code/Program.s.txt index a96b53c..e02b4ae 100644 --- a/hmi/dev/nspanel_us_code/Program.s.txt +++ b/hmi/dev/nspanel_us_code/Program.s.txt @@ -4,12 +4,12 @@ Program.s int r=0,g=0,b=0 int h=0,s=0,v=0 int p=0,q=0,t=0,f=0 - int is_buttonpage01=1, is_buttonpage02=1, is_buttonpage03=1, is_buttonpage04=1 - int is_entitypage01=1, is_entitypage02=1, is_entitypage03=1, is_entitypage04=1 + int is_buttonpage01=0, is_buttonpage02=0, is_buttonpage03=0, is_buttonpage04=0 + int is_entitypage01=0, is_entitypage02=0, is_entitypage03=0, is_entitypage04=0 int back_page_id=0 int dimdelta=0 int api=0 // 0 = disconnected from HA, 1 = connected to HA - int is_entities=0,is_qrcode=0,is_notification=0 + int is_qrcode=0,is_notification=0 int brightness=100,brightness_dim=40,brightness_sleep=0 int display_mode=2 // 1 = EU, 2 = US, 3 = US landscape, 4 = blank int charset=1 // 1 = International (original), 2 = CJK diff --git a/hmi/dev/nspanel_us_code/home.txt b/hmi/dev/nspanel_us_code/home.txt index e8109d7..7330af0 100644 --- a/hmi/dev/nspanel_us_code/home.txt +++ b/hmi/dev/nspanel_us_code/home.txt @@ -13,9 +13,15 @@ Page home Events Preinitialize Event back_page_id=0 + if(is_entitypage01>0||is_entitypage02>0||is_entitypage03>0||is_entitypage04>0) + { + vis bt_entities,1 + }else + { + vis bt_entities,0 + } vis bt_notific,is_notification vis bt_qrcode,is_qrcode - vis bt_entities,is_entities if(display_mode==3) { vis left_bt_text,0 @@ -364,7 +370,22 @@ Text bt_entities Touch Release Event if(api==1) { - page entitypage01 + if(is_entitypage01>0) + { + page entitypage01 + }else if(is_entitypage02>0) + { + page entitypage02 + }else if(is_entitypage03>0) + { + page entitypage03 + }else if(is_entitypage04>0) + { + page entitypage04 + }else + { + vis bt_entities,0 + } } Text button07 diff --git a/hmi/dev/nspanel_us_land_code/Program.s.txt b/hmi/dev/nspanel_us_land_code/Program.s.txt index a7d1d20..70de541 100644 --- a/hmi/dev/nspanel_us_land_code/Program.s.txt +++ b/hmi/dev/nspanel_us_land_code/Program.s.txt @@ -4,12 +4,12 @@ Program.s int r=0,g=0,b=0 int h=0,s=0,v=0 int p=0,q=0,t=0,f=0 - int is_buttonpage01=1, is_buttonpage02=1, is_buttonpage03=1, is_buttonpage04=1 - int is_entitypage01=1, is_entitypage02=1, is_entitypage03=1, is_entitypage04=1 + int is_buttonpage01=0, is_buttonpage02=0, is_buttonpage03=0, is_buttonpage04=0 + int is_entitypage01=0, is_entitypage02=0, is_entitypage03=0, is_entitypage04=0 int back_page_id=0 int dimdelta=0 int api=0 // 0 = disconnected from HA, 1 = connected to HA - int is_entities=0,is_qrcode=0,is_notification=0 + int is_qrcode=0,is_notification=0 int brightness=100,brightness_dim=40,brightness_sleep=0 int display_mode=3 // 1 = EU, 2 = US, 3 = US landscape, 4 = blank int charset=1 // 1 = International (original), 2 = CJK diff --git a/hmi/dev/nspanel_us_land_code/home.txt b/hmi/dev/nspanel_us_land_code/home.txt index e8109d7..7330af0 100644 --- a/hmi/dev/nspanel_us_land_code/home.txt +++ b/hmi/dev/nspanel_us_land_code/home.txt @@ -13,9 +13,15 @@ Page home Events Preinitialize Event back_page_id=0 + if(is_entitypage01>0||is_entitypage02>0||is_entitypage03>0||is_entitypage04>0) + { + vis bt_entities,1 + }else + { + vis bt_entities,0 + } vis bt_notific,is_notification vis bt_qrcode,is_qrcode - vis bt_entities,is_entities if(display_mode==3) { vis left_bt_text,0 @@ -364,7 +370,22 @@ Text bt_entities Touch Release Event if(api==1) { - page entitypage01 + if(is_entitypage01>0) + { + page entitypage01 + }else if(is_entitypage02>0) + { + page entitypage02 + }else if(is_entitypage03>0) + { + page entitypage03 + }else if(is_entitypage04>0) + { + page entitypage04 + }else + { + vis bt_entities,0 + } } Text button07 diff --git a/hmi/dev/nspanel_us_land_code/utilities.txt b/hmi/dev/nspanel_us_land_code/utilities.txt index cf4600e..29a3708 100644 --- a/hmi/dev/nspanel_us_land_code/utilities.txt +++ b/hmi/dev/nspanel_us_land_code/utilities.txt @@ -21,29 +21,9 @@ Page utilities Postinitialize Event sendme -Text title - Attributes - ID : 1 - Scope : local - Dragging : 0 - Send Component ID : on press and release - Associated Keyboard: none - Text : Power Dashboard - Max. Text Size : 100 - -Text title_icon - Attributes - ID : 2 - Scope : local - Dragging : 0 - Send Component ID : on press and release - Associated Keyboard: none - Text :  - Max. Text Size : 10 - Text unavailable Attributes - ID : 5 + ID : 3 Scope : local Dragging : 0 Send Component ID : disabled @@ -51,19 +31,29 @@ Text unavailable Text : Max. Text Size : 1 -Text t0 +Text title_icon Attributes - ID : 6 + ID : 4 Scope : local Dragging : 0 - Send Component ID : disabled + Send Component ID : on press and release Associated Keyboard: none - Text :  - Max. Text Size : 4 + Text :  + Max. Text Size : 10 -Text t1 +Text title Attributes - ID : 7 + ID : 5 + Scope : local + Dragging : 0 + Send Component ID : on press and release + Associated Keyboard: none + Text : Utilities Dashboard + Max. Text Size : 100 + +Text home_icon + Attributes + ID : 6 Scope : local Dragging : 0 Send Component ID : disabled @@ -71,49 +61,9 @@ Text t1 Text : 賈 Max. Text Size : 4 -Text t2 +Text home_label Attributes - ID : 9 - Scope : local - Dragging : 0 - Send Component ID : disabled - Associated Keyboard: none - Text :  - Max. Text Size : 4 - -Text t3 - Attributes - ID : 10 - Scope : local - Dragging : 0 - Send Component ID : disabled - Associated Keyboard: none - Text :  - Max. Text Size : 4 - -Text t4 - Attributes - ID : 11 - Scope : local - Dragging : 0 - Send Component ID : disabled - Associated Keyboard: none - Text : Green - Max. Text Size : 10 - -Text t5 - Attributes - ID : 12 - Scope : local - Dragging : 0 - Send Component ID : disabled - Associated Keyboard: none - Text : Fossil - Max. Text Size : 10 - -Text t6 - Attributes - ID : 15 + ID : 7 Scope : local Dragging : 0 Send Component ID : disabled @@ -121,199 +71,309 @@ Text t6 Text : Home Max. Text Size : 10 -Text t7 +Text home + Attributes + ID : 8 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Text home_value2 + Attributes + ID : 9 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Text grid_icon + Attributes + ID : 11 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text :  + Max. Text Size : 4 + +Text grid_label + Attributes + ID : 12 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : Grid + Max. Text Size : 10 + +Text grid + Attributes + ID : 13 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Text grid_value2 + Attributes + ID : 14 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Text group01_icon + Attributes + ID : 15 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text :  + Max. Text Size : 4 + +Text group01_label Attributes ID : 16 Scope : local Dragging : 0 Send Component ID : disabled Associated Keyboard: none - Text : 全 - Max. Text Size : 4 + Text : Label + Max. Text Size : 10 -Text t8 +Text group01 Attributes ID : 17 Scope : local Dragging : 0 Send Component ID : disabled Associated Keyboard: none - Text : Solar + Text : Max. Text Size : 10 -Text t9 +Text group01_value2 Attributes - ID : 19 + ID : 18 Scope : local Dragging : 0 Send Component ID : disabled Associated Keyboard: none - Text : 98% + Text : Max. Text Size : 10 -Text t10 +Text group02_icon Attributes ID : 20 Scope : local Dragging : 0 Send Component ID : disabled Associated Keyboard: none - Text : 2% - Max. Text Size : 10 + Text :  + Max. Text Size : 4 -Text t11 +Text group02_label Attributes ID : 21 Scope : local Dragging : 0 Send Component ID : disabled Associated Keyboard: none - Text : 豈 - Max. Text Size : 4 + Text : Label + Max. Text Size : 10 -Text t12 +Text group02 Attributes ID : 22 Scope : local Dragging : 0 Send Component ID : disabled Associated Keyboard: none - Text : Battery + Text : Max. Text Size : 10 -Text t13 +Text group02_value2 Attributes - ID : 24 + ID : 23 Scope : local Dragging : 0 Send Component ID : disabled Associated Keyboard: none - Text : 暑 - Max. Text Size : 4 + Text : + Max. Text Size : 10 -Text t14 +Text group03_icon Attributes ID : 25 Scope : local Dragging : 0 Send Component ID : disabled Associated Keyboard: none - Text : Heating + Text :  + Max. Text Size : 4 + +Text group03_label + Attributes + ID : 26 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : Label Max. Text Size : 10 -Text t15 +Text group03 Attributes ID : 27 Scope : local Dragging : 0 Send Component ID : disabled Associated Keyboard: none - Text : 1.7 kW + Text : Max. Text Size : 10 -Text t16 +Text group03_value2 Attributes ID : 28 Scope : local Dragging : 0 Send Component ID : disabled Associated Keyboard: none - Text : 21.7°C + Text : Max. Text Size : 10 -Text t17 - Attributes - ID : 29 - Scope : local - Dragging : 0 - Send Component ID : disabled - Associated Keyboard: none - Text : 1.1 kW - Max. Text Size : 10 - -Text t18 +Text group04_icon Attributes ID : 30 Scope : local Dragging : 0 Send Component ID : disabled Associated Keyboard: none - Text : -2.1 kW - Max. Text Size : 10 + Text :  + Max. Text Size : 4 -Text t19 +Text group04_label Attributes ID : 31 Scope : local Dragging : 0 Send Component ID : disabled Associated Keyboard: none - Text : 0.8 kW + Text : Label Max. Text Size : 10 -Text t20 +Text group04 Attributes ID : 32 Scope : local Dragging : 0 Send Component ID : disabled Associated Keyboard: none - Text : 慎 - Max. Text Size : 4 + Text : + Max. Text Size : 10 -Text t21 +Text group04_value2 Attributes ID : 33 Scope : local Dragging : 0 Send Component ID : disabled Associated Keyboard: none - Text : Wind + Text : Max. Text Size : 10 -Text t22 +Text group05_icon Attributes ID : 35 Scope : local Dragging : 0 Send Component ID : disabled Associated Keyboard: none - Text : 1.1 kW - Max. Text Size : 10 + Text :  + Max. Text Size : 4 -Text t23 +Text group05_label Attributes ID : 36 Scope : local Dragging : 0 Send Component ID : disabled Associated Keyboard: none - Text :  - Max. Text Size : 4 + Text : Label + Max. Text Size : 10 -Text t24 +Text group05 Attributes ID : 37 Scope : local Dragging : 0 Send Component ID : disabled Associated Keyboard: none - Text : Car + Text : Max. Text Size : 10 -Text t25 +Text group05_value2 Attributes - ID : 39 + ID : 38 Scope : local Dragging : 0 Send Component ID : disabled Associated Keyboard: none - Text : 1.1 kW + Text : Max. Text Size : 10 -Slider h0 +Text group06_icon Attributes - ID : 8 + ID : 40 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text :  + Max. Text Size : 4 + +Text group06_label + Attributes + ID : 41 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : Label + Max. Text Size : 10 + +Text group06 + Attributes + ID : 42 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Text group06_value2 + Attributes + ID : 43 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Slider line_main + Attributes + ID : 10 Scope : local Dragging : 0 Send Component ID: disabled @@ -321,9 +381,9 @@ Slider h0 Upper range limit: 100 Lower range limit: 0 -Slider h1 +Slider group01_line Attributes - ID : 13 + ID : 19 Scope : local Dragging : 0 Send Component ID: disabled @@ -331,9 +391,9 @@ Slider h1 Upper range limit: 100 Lower range limit: 0 -Slider h2 +Slider group02_line Attributes - ID : 14 + ID : 24 Scope : local Dragging : 0 Send Component ID: disabled @@ -341,9 +401,9 @@ Slider h2 Upper range limit: 100 Lower range limit: 0 -Slider h3 +Slider group03_line Attributes - ID : 18 + ID : 29 Scope : local Dragging : 0 Send Component ID: disabled @@ -351,27 +411,7 @@ Slider h3 Upper range limit: 100 Lower range limit: 0 -Slider h4 - Attributes - ID : 23 - Scope : local - Dragging : 0 - Send Component ID: disabled - Position : 50 - Upper range limit: 100 - Lower range limit: 0 - -Slider h5 - Attributes - ID : 26 - Scope : local - Dragging : 0 - Send Component ID: disabled - Position : 50 - Upper range limit: 100 - Lower range limit: 0 - -Slider h6 +Slider group04_line Attributes ID : 34 Scope : local @@ -381,9 +421,19 @@ Slider h6 Upper range limit: 100 Lower range limit: 0 -Slider h7 +Slider group05_line Attributes - ID : 38 + ID : 39 + Scope : local + Dragging : 0 + Send Component ID: disabled + Position : 50 + Upper range limit: 100 + Lower range limit: 0 + +Slider group06_line + Attributes + ID : 44 Scope : local Dragging : 0 Send Component ID: disabled @@ -393,7 +443,7 @@ Slider h7 Button button_back Attributes - ID : 3 + ID : 2 Scope : local Dragging : 0 Send Component ID: on press and release @@ -403,11 +453,11 @@ Button button_back Events Touch Press Event - page back_page_id + page home Timer wakeup_timer Attributes - ID : 4 + ID : 1 Scope : local Period (ms): 100 Enabled : yes diff --git a/hmi/nspanel_eu.HMI b/hmi/nspanel_eu.HMI index 23770f4..444aa5d 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 43df656..7c3a776 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 aa929a8..16fcb9d 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 5349eba..1e8e1e6 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 602f04e..673a3b8 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 2f125d2..d7538c2 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 3b71e84..8734afb 100644 --- a/nspanel_blueprint.yaml +++ b/nspanel_blueprint.yaml @@ -2411,15 +2411,6 @@ blueprint: default: ' ' selector: *placeholder-selector ##### PLACEHOLDER ###################################################################### - entitypages_enabled: - name: Activate entity page - TRUE/FALSE (Optional) - default: false - description: > - *SYSTEM settings* - - *Activate entity page and entity page Button on the home page* - selector: - boolean: home_button06_icon: name: Entity page - ICON (Optional) description: > @@ -7850,7 +7841,6 @@ action: color_normal: !input 'home_button04_icon_color01' color_unread: !input 'home_button04_icon_color02' bt_entities: - enabled: !input 'entitypages_enabled' icon: !input 'home_button06_icon' color_rgb: !input 'home_button06_icon_color' bt_qrcode: @@ -7896,7 +7886,6 @@ action: else all_icons["format-list-bulleted-square"]) }} qrcode_icon_color: '{{ bt_qrcode.color_rgb }}' - entities_pages: '{{ bt_entities.enabled }}' entities_pages_icon: > {{ all_icons[bt_entities.icon.split(":")[1]] | default(bt_entities.icon