Home buttons new format - Alarm

Modernise the button Alarm flow on page Home to improve performance.
This commit is contained in:
Edward Firmo
2023-08-23 10:54:56 +02:00
parent c389c5b20b
commit f399d757e5
13 changed files with 54 additions and 85 deletions

View File

@@ -5,6 +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
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,6 +21,9 @@ Page home
prints "{\"page\": \"home\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0
printh 00
printh FF FF FF
vis button06_icon,0
vis button06,0
vis bt_alarm,is_alarm
Variable (int32) brightness
Attributes
@@ -48,14 +51,14 @@ Variable (int32) sleepmodus
Variable (string) lastclick
Attributes
ID : 54
ID : 53
Scope : local
Text :
Max. Text Size: 100
Variable (string) entity
Attributes
ID : 55
ID : 54
Scope : global
Text :
Max. Text Size: 100
@@ -360,7 +363,7 @@ Text button06_icon
Text :
Max. Text Size : 10
Text button07_icon
Text bt_alarm
Attributes
ID : 44
Scope : global
@@ -370,9 +373,17 @@ Text button07_icon
Text :
Max. Text Size : 10
Events
Touch Release Event
if(api==1)
{
entity.txt=""
page alarm
}
Text meridiem
Attributes
ID : 53
ID : 52
Scope : global
Dragging : 0
Send Component ID : disabled
@@ -552,24 +563,9 @@ Hotspot button06
page entitypage01
}
Hotspot button07
Attributes
ID : 51
Scope : local
Dragging : 0
Send Component ID: disabled
Events
Touch Release Event
if(api==1)
{
entity.txt=""
page alarm
}
Hotspot settings_click
Attributes
ID : 52
ID : 51
Scope : local
Dragging : 0
Send Component ID: on release
@@ -625,7 +621,7 @@ Timer sleeptimer
Timer settings_timer
Attributes
ID : 56
ID : 55
Scope : local
Period (ms): 1000
Enabled : no