Home buttons new format - Notification

Modernise the button "Notification" flow on page Home to improve performance.

I haven't moved the code from the Blueprint to ESPHome yet, as I will leave this for when we rebuild the Notification flow in the near future (hopefully), so the performance gains may not be perceived now. Just aligning with other buttons format.
This commit is contained in:
Edward Firmo
2023-08-24 10:18:42 +02:00
parent 27fc5c3e89
commit a907ff5004
14 changed files with 88 additions and 97 deletions

View File

@@ -5,7 +5,7 @@ Program.s
int h=0,s=0,v=0
int p=0,q=0,t=0,f=0
int api=0 // 0 = disconnected from HA, 1 = connected to HA
int is_alarm=0,is_entities=0,is_qrcode=0
int is_alarm=0,is_entities=0,is_qrcode=0,is_notification=0
bauds=115200//Configure baudrat
recmod=0//Serial data parsing mode:0-Passive mode;1-Active mode
printh 00 00 00 ff ff ff 88 ff ff ff//Output power on information to serial port

View File

@@ -21,9 +21,10 @@ Page home
prints "{\"page\": \"home\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0
printh 00
printh FF FF FF
vis bt_notific,is_notification
vis bt_qrcode,is_qrcode
vis bt_entities,is_entities
vis bt_alarm,is_alarm
vis bt_qrcode,is_qrcode
Variable (int32) brightness
Attributes
@@ -51,14 +52,14 @@ Variable (int32) sleepmodus
Variable (string) lastclick
Attributes
ID : 51
ID : 50
Scope : local
Text :
Max. Text Size: 100
Variable (string) entity
Attributes
ID : 52
ID : 51
Scope : global
Text :
Max. Text Size: 100
@@ -333,7 +334,7 @@ Text button03_icon
Text :
Max. Text Size : 10
Text button04_icon
Text bt_notific
Attributes
ID : 41
Scope : global
@@ -343,6 +344,13 @@ Text button04_icon
Text :
Max. Text Size : 10
Events
Touch Release Event
if(api==1)
{
page notification
}
Text bt_qrcode
Attributes
ID : 42
@@ -394,7 +402,7 @@ Text bt_alarm
Text meridiem
Attributes
ID : 50
ID : 49
Scope : global
Dragging : 0
Send Component ID : disabled
@@ -526,26 +534,9 @@ Hotspot button03
printh 00
printh FF FF FF
Hotspot button04
Attributes
ID : 48
Scope : local
Dragging : 0
Send Component ID: disabled
Events
Touch Release Event
lastclick.txt="{\"page\": \"home\", \"component\": \"button04\", \"value\": \"release\"}"
printh 92
prints "nspanelevent",0
printh 00
prints lastclick.txt,0
printh 00
printh FF FF FF
Hotspot settings_click
Attributes
ID : 49
ID : 48
Scope : local
Dragging : 0
Send Component ID: disabled
@@ -601,7 +592,7 @@ Timer sleeptimer
Timer settings_timer
Attributes
ID : 53
ID : 52
Scope : local
Period (ms): 1000
Enabled : no