Home page - Custom buttons
On the blueprint you can now set up to 3 buttons to be shown on Home page. It will show the detailed settings page, so the entity must be compatible.
This commit is contained in:
@@ -692,7 +692,7 @@ Timer click_timer
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
lastclick.txt="{\"page\": \"buttonpage01\", \"event\": \"long_click\", \"component\": \""+click_comp.txt+"\"}"
|
||||
lastclick.txt="{\"page\": \"climate\", \"event\": \"long_click\", \"component\": \""+click_comp.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
|
||||
@@ -52,18 +52,25 @@ Variable (int32) disdim
|
||||
|
||||
Variable (string) lastclick
|
||||
Attributes
|
||||
ID : 45
|
||||
ID : 39
|
||||
Scope : local
|
||||
Text :
|
||||
Max. Text Size: 100
|
||||
|
||||
Variable (string) climate_entity
|
||||
Attributes
|
||||
ID : 46
|
||||
ID : 40
|
||||
Scope : global
|
||||
Text :
|
||||
Max. Text Size: 100
|
||||
|
||||
Variable (string) click_comp
|
||||
Attributes
|
||||
ID : 48
|
||||
Scope : local
|
||||
Text :
|
||||
Max. Text Size: 8
|
||||
|
||||
Text time
|
||||
Attributes
|
||||
ID : 5
|
||||
@@ -142,7 +149,7 @@ Text icon_top_01
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
Max. Text Size : 3
|
||||
|
||||
Text icon_top_02
|
||||
Attributes
|
||||
@@ -152,7 +159,7 @@ Text icon_top_02
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
Max. Text Size : 3
|
||||
|
||||
Text icon_top_03
|
||||
Attributes
|
||||
@@ -162,7 +169,7 @@ Text icon_top_03
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
Max. Text Size : 3
|
||||
|
||||
Text icon_top_04
|
||||
Attributes
|
||||
@@ -172,7 +179,7 @@ Text icon_top_04
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
Max. Text Size : 3
|
||||
|
||||
Text icon_top_05
|
||||
Attributes
|
||||
@@ -182,7 +189,7 @@ Text icon_top_05
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
Max. Text Size : 3
|
||||
|
||||
Text icon_top_06
|
||||
Attributes
|
||||
@@ -192,7 +199,7 @@ Text icon_top_06
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
Max. Text Size : 3
|
||||
|
||||
Text icon_top_07
|
||||
Attributes
|
||||
@@ -202,7 +209,7 @@ Text icon_top_07
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
Max. Text Size : 3
|
||||
|
||||
Text icon_top_08
|
||||
Attributes
|
||||
@@ -212,7 +219,7 @@ Text icon_top_08
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
Max. Text Size : 3
|
||||
|
||||
Text icon_top_09
|
||||
Attributes
|
||||
@@ -222,7 +229,7 @@ Text icon_top_09
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
Max. Text Size : 3
|
||||
|
||||
Text icon_top_10
|
||||
Attributes
|
||||
@@ -232,7 +239,7 @@ Text icon_top_10
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
Max. Text Size : 3
|
||||
|
||||
Text value01_icon
|
||||
Attributes
|
||||
@@ -242,7 +249,7 @@ Text value01_icon
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
Max. Text Size : 3
|
||||
|
||||
Text value03_state
|
||||
Attributes
|
||||
@@ -262,7 +269,7 @@ Text value03_icon
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
Max. Text Size : 3
|
||||
|
||||
Text value02_icon
|
||||
Attributes
|
||||
@@ -272,7 +279,7 @@ Text value02_icon
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
Max. Text Size : 3
|
||||
|
||||
Text value02_state
|
||||
Attributes
|
||||
@@ -302,9 +309,9 @@ Text indoortempicon
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
Max. Text Size : 3
|
||||
|
||||
Text button01_icon
|
||||
Text bt_notific
|
||||
Attributes
|
||||
ID : 33
|
||||
Scope : global
|
||||
@@ -312,37 +319,7 @@ Text button01_icon
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text button02_icon
|
||||
Attributes
|
||||
ID : 34
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text button03_icon
|
||||
Attributes
|
||||
ID : 35
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text bt_notific
|
||||
Attributes
|
||||
ID : 36
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
Max. Text Size : 3
|
||||
|
||||
Events
|
||||
Touch Release Event
|
||||
@@ -353,13 +330,13 @@ Text bt_notific
|
||||
|
||||
Text bt_qrcode
|
||||
Attributes
|
||||
ID : 37
|
||||
ID : 34
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
Max. Text Size : 3
|
||||
|
||||
Events
|
||||
Touch Release Event
|
||||
@@ -367,13 +344,13 @@ Text bt_qrcode
|
||||
|
||||
Text bt_entities
|
||||
Attributes
|
||||
ID : 38
|
||||
ID : 35
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
Max. Text Size : 3
|
||||
|
||||
Events
|
||||
Touch Release Event
|
||||
@@ -384,13 +361,13 @@ Text bt_entities
|
||||
|
||||
Text bt_alarm
|
||||
Attributes
|
||||
ID : 39
|
||||
ID : 36
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
Max. Text Size : 3
|
||||
|
||||
Events
|
||||
Touch Release Event
|
||||
@@ -401,7 +378,7 @@ Text bt_alarm
|
||||
|
||||
Text meridiem
|
||||
Attributes
|
||||
ID : 44
|
||||
ID : 38
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
@@ -409,6 +386,90 @@ Text meridiem
|
||||
Text :
|
||||
Max. Text Size : 2
|
||||
|
||||
Text button01
|
||||
Attributes
|
||||
ID : 45
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 3
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
click_comp.txt="button01"
|
||||
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
|
||||
}
|
||||
|
||||
Text button02
|
||||
Attributes
|
||||
ID : 46
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 3
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
click_comp.txt="button02"
|
||||
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
|
||||
}
|
||||
|
||||
Text button03
|
||||
Attributes
|
||||
ID : 47
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 3
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
click_comp.txt="button03"
|
||||
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 : 9
|
||||
@@ -418,7 +479,7 @@ Picture weather
|
||||
|
||||
Dual-state Button left_bt_pic
|
||||
Attributes
|
||||
ID : 48
|
||||
ID : 42
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
@@ -428,7 +489,7 @@ Dual-state Button left_bt_pic
|
||||
|
||||
Dual-state Button right_bt_pic
|
||||
Attributes
|
||||
ID : 49
|
||||
ID : 43
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
@@ -489,60 +550,9 @@ Hotspot jump_climate
|
||||
page climate
|
||||
}
|
||||
|
||||
Hotspot button01
|
||||
Attributes
|
||||
ID : 40
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Events
|
||||
Touch Release Event
|
||||
lastclick.txt="{\"page\": \"home\", \"component\": \"button01\", \"value\": \"release\"}"
|
||||
printh 92
|
||||
prints "nspanelevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
|
||||
Hotspot button02
|
||||
Attributes
|
||||
ID : 41
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Events
|
||||
Touch Release Event
|
||||
lastclick.txt="{\"page\": \"home\", \"component\": \"button02\", \"value\": \"release\"}"
|
||||
printh 92
|
||||
prints "nspanelevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
|
||||
Hotspot button03
|
||||
Attributes
|
||||
ID : 42
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Events
|
||||
Touch Release Event
|
||||
lastclick.txt="{\"page\": \"home\", \"component\": \"button03\", \"value\": \"release\"}"
|
||||
printh 92
|
||||
prints "nspanelevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
|
||||
Hotspot settings_click
|
||||
Attributes
|
||||
ID : 43
|
||||
ID : 37
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
@@ -598,7 +608,7 @@ Timer sleeptimer
|
||||
|
||||
Timer settings_timer
|
||||
Attributes
|
||||
ID : 47
|
||||
ID : 41
|
||||
Scope : local
|
||||
Period (ms): 1000
|
||||
Enabled : no
|
||||
@@ -609,7 +619,7 @@ Timer settings_timer
|
||||
|
||||
Timer wakeup_timer
|
||||
Attributes
|
||||
ID : 50
|
||||
ID : 44
|
||||
Scope : local
|
||||
Period (ms): 50
|
||||
Enabled : yes
|
||||
@@ -630,6 +640,24 @@ Timer wakeup_timer
|
||||
wakeup_timer.en=0
|
||||
}
|
||||
|
||||
Timer click_timer
|
||||
Attributes
|
||||
ID : 49
|
||||
Scope : local
|
||||
Period (ms): 800
|
||||
Enabled : no
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
lastclick.txt="{\"page\": \"home\", \"event\": \"long_click\", \"component\": \""+click_comp.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
click_timer.en=0
|
||||
|
||||
TouchCap swipe
|
||||
Attributes
|
||||
ID : 3
|
||||
|
||||
Reference in New Issue
Block a user