Files
NSPanel_HA_Blueprint/nspanel_eu_code/notification.txt
Chris 6de0c44b14 Nspanel event (#689)
* upd: hmi2txt export

* upd: sync latest dev

* upd: currentpage

* upd: lightsettings

* upd: coversettings

* upd: touchevent

* Fix error preventing long click on button pages

* upd: climate

* upd: lastclick w.o. blueprint

* Upd: Long_press - Lights

* Update: Everything else (#688)

Still a bug with confirmation message and long press button.

* Fix: Notifications

* Fix: Button long press

* Fix: Climate page

* Fix: Indoor temp when no sensor defined

* fix: open climate from homepage triggers mulitple

---------

Co-authored-by: Edward Firmo <94725493+edwardtfn@users.noreply.github.com>
2023-04-18 21:54:04 +02:00

269 lines
7.4 KiB
Plaintext

Page notification
Attributes
ID : 0
Scope : local
Dragging : 0
Send Component ID : disabled
Opacity : 127
Width : 480
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 : 10
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 : 17
y coordinate : 60
Width : 398
Height : 191
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 : 17
y coordinate : 7
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
Picture accept_pic
Attributes
ID : 4
Scope : local
Dragging : 0
Send Component ID: disabled
Opacity : 127
x coordinate : 96
y coordinate : 260
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 : 270
y coordinate : 260
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 : 387
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 : 96
y coordinate : 260
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 : 270
y coordinate : 260
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
}
}