Climate - Custom buttons (#859)

* Climate - Custom buttons

Initial implementation of custom buttons on climate pages.

* Update nspanel_esphome.yaml

* Update tft files

* Update nspanel_eu_code

* update nspanel_us_code
This commit is contained in:
Edward Firmo
2023-06-05 12:00:14 +02:00
committed by GitHub
parent 6219ecdc79
commit cc1f6999cc
30 changed files with 7673 additions and 15740 deletions

View File

@@ -1,297 +1,191 @@
Page notification
Attributes
ID : 0
Scope : local
Dragging : 0
Send Component ID : disabled
Opacity : 127
Width : 320
Effect : load
Effect Priority : 0
Effect Time : 300
Locked : no
Swide up page ID : disabled
Swide down page ID : disabled
Swide left page ID : disabled
Swide right page ID: disabled
Fill : picture
Back. Picture ID : 114
Events
Preinitialize Event
dim=home.brightness.val
printh 92
prints "nspanelevent",0
printh 00
prints "{\"page\": \"notification\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0
printh 00
printh FF FF FF
Touch Press Event
printh 92
prints "touchevent",0
printh 00
prints "{\"page\": \"notification\", \"component\": \"touchevent\", \"value\": \"press\"}",0
printh 00
printh FF FF FF
Touch Release Event
printh 92
prints "touchevent",0
printh 00
prints "{\"page\": \"notification\", \"component\": \"touchevent\", \"value\": \"release\"}",0
printh 00
printh FF FF FF
Variable (string) lastclick
Attributes
ID : 11
Scope : local
Text :
Max. Text Size: 100
Text notifi_text01
Attributes
ID : 2
Scope : local
Dragging : 0
Send Component ID : disabled
Opacity : 127
x coordinate : 15
y coordinate : 108
Width : 291
Height : 292
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Associated Keyboard : none
Font ID : 3
Back. Color : 0
Font Color : 65535
Horizontal Alignment: center
Vertical Alignment : center
Input Type : character
Text :
Max. Text Size : 100
Word wrap : enabled
Horizontal Spacing : 0
Vertical Spacing : 0
Text notifi_label
Attributes
ID : 3
Scope : local
Dragging : 0
Send Component ID : disabled
Opacity : 127
x coordinate : 10
y coordinate : 56
Width : 300
Height : 42
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Associated Keyboard : none
Font ID : 3
Back. Color : 0
Font Color : 50712
Horizontal Alignment: left
Vertical Alignment : bottom
Input Type : character
Text :
Max. Text Size : 30
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
Text loading
Attributes
ID : 10
Scope : local
Dragging : 0
Send Component ID : disabled
Opacity : 127
x coordinate : 45
y coordinate : 5
Width : 100
Height : 30
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Associated Keyboard : none
Font ID : 3
Back. Color : 0
Font Color : 0
Horizontal Alignment: center
Vertical Alignment : center
Input Type : character
Text :
Max. Text Size : 1
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
Picture accept_pic
Attributes
ID : 4
Scope : local
Dragging : 0
Send Component ID: disabled
Opacity : 127
x coordinate : 35
y coordinate : 403
Width : 50
Height : 50
Effect : load
Effect Priority : 0
Effect Time : 300
Picture ID : 85
Picture clear_pic
Attributes
ID : 5
Scope : local
Dragging : 0
Send Component ID: disabled
Opacity : 127
x coordinate : 230
y coordinate : 403
Width : 50
Height : 50
Effect : load
Effect Priority : 0
Effect Time : 300
Picture ID : 86
Hotspot notifi_back
Attributes
ID : 1
Scope : local
Dragging : 0
Send Component ID: disabled
Opacity : 127
x coordinate : 260
y coordinate : 0
Width : 60
Height : 35
Effect : load
Effect Priority : 0
Effect Time : 300
Events
Touch Press Event
page home
Hotspot accept
Attributes
ID : 6
Scope : local
Dragging : 0
Send Component ID: disabled
Opacity : 127
x coordinate : 35
y coordinate : 403
Width : 50
Height : 50
Effect : load
Effect Priority : 0
Effect Time : 300
Events
Touch Release Event
lastclick.txt="{\"page\": \"notification\", \"component\": \"accept\", \"value\": \"release\"}"
printh 92
prints "nspanelevent",0
printh 00
prints lastclick.txt,0
printh 00
printh FF FF FF
Hotspot clear
Attributes
ID : 7
Scope : local
Dragging : 0
Send Component ID: disabled
Opacity : 127
x coordinate : 230
y coordinate : 403
Width : 50
Height : 50
Effect : load
Effect Priority : 0
Effect Time : 300
Events
Touch Release Event
lastclick.txt="{\"page\": \"notification\", \"component\": \"clear\", \"value\": \"release\"}"
printh 92
prints "nspanelevent",0
printh 00
prints lastclick.txt,0
printh 00
printh FF FF FF
Timer swipestore
Attributes
ID : 9
Scope : local
Period (ms): 50
Enabled : no
Events
Timer Event
swipex=tch0
swipey=tch1
TouchCap swipe
Attributes
ID : 8
Scope: local
Value: 0
Events
Touch Press Event
swipestore.en=1 // Start swipestore timer
Touch Release Event
swipestore.en=0
// Touch has ended, x
if(tch0==0)
{
swipec=swipex-tch2
// From Left to Right
if(swipec>swipedx)
{
//page
}
// Right to Left
swipec2=0-swipedx
if(swipec<swipec2)
{
//page
}
}
// Touch has ended, y
if(tch1==0)
{
swipec=swipey-tch3
// From Up to Down
if(swipec>100)
{
//page
}
// Down to Up
swipec2=0-swipedy
if(swipec<-100)
{
//page
}
}
Page notification
Attributes
ID : 0
Scope : local
Dragging : 0
Send Component ID : disabled
Locked : no
Swide up page ID : disabled
Swide down page ID : disabled
Swide left page ID : disabled
Swide right page ID: disabled
Events
Preinitialize Event
dim=home.brightness.val
printh 92
prints "nspanelevent",0
printh 00
prints "{\"page\": \"notification\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0
printh 00
printh FF FF FF
Touch Press Event
printh 92
prints "touchevent",0
printh 00
prints "{\"page\": \"notification\", \"component\": \"touchevent\", \"value\": \"press\"}",0
printh 00
printh FF FF FF
Touch Release Event
printh 92
prints "touchevent",0
printh 00
prints "{\"page\": \"notification\", \"component\": \"touchevent\", \"value\": \"release\"}",0
printh 00
printh FF FF FF
Variable (string) lastclick
Attributes
ID : 11
Scope : local
Text :
Max. Text Size: 100
Text notifi_text01
Attributes
ID : 2
Scope : local
Dragging : 0
Send Component ID : disabled
Associated Keyboard: none
Text :
Max. Text Size : 100
Text notifi_label
Attributes
ID : 3
Scope : local
Dragging : 0
Send Component ID : disabled
Associated Keyboard: none
Text :
Max. Text Size : 30
Text loading
Attributes
ID : 10
Scope : local
Dragging : 0
Send Component ID : disabled
Associated Keyboard: none
Text :
Max. Text Size : 1
Picture accept_pic
Attributes
ID : 4
Scope : local
Dragging : 0
Send Component ID: disabled
Picture clear_pic
Attributes
ID : 5
Scope : local
Dragging : 0
Send Component ID: disabled
Hotspot notifi_back
Attributes
ID : 1
Scope : local
Dragging : 0
Send Component ID: disabled
Events
Touch Press Event
page home
Hotspot accept
Attributes
ID : 6
Scope : local
Dragging : 0
Send Component ID: disabled
Events
Touch Release Event
lastclick.txt="{\"page\": \"notification\", \"component\": \"accept\", \"value\": \"release\"}"
printh 92
prints "nspanelevent",0
printh 00
prints lastclick.txt,0
printh 00
printh FF FF FF
Hotspot clear
Attributes
ID : 7
Scope : local
Dragging : 0
Send Component ID: disabled
Events
Touch Release Event
lastclick.txt="{\"page\": \"notification\", \"component\": \"clear\", \"value\": \"release\"}"
printh 92
prints "nspanelevent",0
printh 00
prints lastclick.txt,0
printh 00
printh FF FF FF
Timer swipestore
Attributes
ID : 9
Scope : local
Period (ms): 50
Enabled : no
Events
Timer Event
swipex=tch0
swipey=tch1
TouchCap swipe
Attributes
ID : 8
Scope: local
Value: 0
Events
Touch Press Event
swipestore.en=1 // Start swipestore timer
Touch Release Event
swipestore.en=0
// Touch has ended, x
if(tch0==0)
{
swipec=swipex-tch2
// From Left to Right
if(swipec>swipedx)
{
//page
}
// Right to Left
swipec2=0-swipedx
if(swipec<swipec2)
{
//page
}
}
// Touch has ended, y
if(tch1==0)
{
swipec=swipey-tch3
// From Up to Down
if(swipec>100)
{
//page
}
// Down to Up
swipec2=0-swipedy
if(swipec<-100)
{
//page
}
}