Skip to content

Commit

Permalink
Remove input "Activate entity page - TRUE/FALSE (Optional)"
Browse files Browse the repository at this point in the history
The icon will be shown if any entity is assigned.
Supports #999
Supports #946
  • Loading branch information
edwardtfn committed Feb 29, 2024
1 parent a3df5f9 commit 75495ea
Show file tree
Hide file tree
Showing 16 changed files with 236 additions and 137 deletions.
2 changes: 0 additions & 2 deletions docs/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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
Expand Down
1 change: 0 additions & 1 deletion esphome/nspanel_esphome_core.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
6 changes: 3 additions & 3 deletions hmi/dev/nspanel_eu_code/Program.s.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
25 changes: 23 additions & 2 deletions hmi/dev/nspanel_eu_code/home.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions hmi/dev/nspanel_us_code/Program.s.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
25 changes: 23 additions & 2 deletions hmi/dev/nspanel_us_code/home.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions hmi/dev/nspanel_us_land_code/Program.s.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
25 changes: 23 additions & 2 deletions hmi/dev/nspanel_us_land_code/home.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
Loading

0 comments on commit 75495ea

Please sign in to comment.