Files
NSPanel_HA_Blueprint/nspanel_eu_code/climate_backup.txt
Edward Firmo 5298a0a032 Move target_temp set to TFT (#849)
* Move target_temp set to TFT

Use TFT to set target temp from slider and +/-.
Using decimals for slider.

* Update nspanel_esphome.yaml

* Update nspanel_eu files

* update nspanel_eu_code folder
2023-05-29 18:12:58 +02:00

690 lines
24 KiB
Plaintext

Page climate_backup
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
printh 92
prints "nspanelevent",0
printh 00
prints "{\"page\": \"climate\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0
printh 00
printh FF FF FF
Touch Press Event
printh 92
prints "touchevent",0
printh 00
prints "{\"page\": \"climate\", \"component\": \"touchevent\", \"value\": \"press\"}",0
printh 00
printh FF FF FF
Touch Release Event
printh 92
prints "touchevent",0
printh 00
prints "{\"page\": \"climate\", \"component\": \"touchevent\", \"value\": \"release\"}",0
printh 00
printh FF FF FF
Variable (int32) climateslider
Attributes
ID : 7
Scope: local
Value: 0
Variable (int32) va0
Attributes
ID : 21
Scope: local
Value: 0
Variable (string) climatesetting
Attributes
ID : 24
Scope : local
Text :
Max. Text Size: 100
Number sliderval
Attributes
ID : 22
Scope : local
Dragging : 0
Send Component ID : disabled
Associated Keyboard: none
Value : 0
Text current_temp
Attributes
ID : 8
Scope : local
Dragging : 0
Send Component ID : disabled
Associated Keyboard: none
Text :
Max. Text Size : 6
Text target_temp
Attributes
ID : 9
Scope : local
Dragging : 0
Send Component ID : disabled
Associated Keyboard: none
Text :
Max. Text Size : 6
Text outdoor_temp
Attributes
ID : 10
Scope : local
Dragging : 0
Send Component ID : disabled
Associated Keyboard: none
Text :
Max. Text Size : 6
Text hotwater_temp
Attributes
ID : 11
Scope : local
Dragging : 0
Send Component ID : disabled
Associated Keyboard: none
Text :
Max. Text Size : 6
Text heating_state
Attributes
ID : 16
Scope : local
Dragging : 0
Send Component ID : disabled
Associated Keyboard: none
Text :
Max. Text Size : 20
Text climate_label
Attributes
ID : 23
Scope : local
Dragging : 0
Send Component ID : disabled
Associated Keyboard: none
Text :
Max. Text Size : 30
Picture climate_left
Attributes
ID : 3
Scope : local
Dragging : 0
Send Component ID: on press and release
Events
Touch Press Event
slider.en=1
Touch Release Event
slider.en=0
Picture climate_middle
Attributes
ID : 4
Scope : local
Dragging : 0
Send Component ID: on press and release
Events
Touch Press Event
slider.en=1
Touch Release Event
slider.en=0
Picture climate_right
Attributes
ID : 5
Scope : local
Dragging : 0
Send Component ID: on press and release
Events
Touch Press Event
slider.en=1
Touch Release Event
slider.en=0
Picture climate_exit
Attributes
ID : 14
Scope : local
Dragging : 0
Send Component ID: disabled
Picture hotw_bt_pic
Attributes
ID : 17
Scope : local
Dragging : 0
Send Component ID: disabled
Picture heating_bt_pic
Attributes
ID : 19
Scope : local
Dragging : 0
Send Component ID: disabled
Hotspot decrease_temp
Attributes
ID : 12
Scope : local
Dragging : 0
Send Component ID: disabled
Events
Touch Press Event
climatesetting.txt="{\"page\": \"climate\", \"component\": \"decreasetemp\", \"value\": \"press\"}"
printh 92
prints "nspanelevent",0
printh 00
prints climatesetting.txt,0
printh 00
printh FF FF FF
Touch Release Event
climatesetting.txt="{\"page\": \"climate\", \"component\": \"decreasetemp\", \"value\": \"release\"}"
printh 92
prints "nspanelevent",0
printh 00
prints climatesetting.txt,0
printh 00
printh FF FF FF
Hotspot increase_temp
Attributes
ID : 13
Scope : local
Dragging : 0
Send Component ID: disabled
Events
Touch Press Event
climatesetting.txt="{\"page\": \"climate\", \"component\": \"increasetemp\", \"value\": \"press\"}"
printh 92
prints "nspanelevent",0
printh 00
prints climatesetting.txt,0
printh 00
printh FF FF FF
Touch Release Event
climatesetting.txt="{\"page\": \"climate\", \"component\": \"increasetemp\", \"value\": \"release\"}"
printh 92
prints "nspanelevent",0
printh 00
prints climatesetting.txt,0
printh 00
printh FF FF FF
Hotspot climate_back
Attributes
ID : 15
Scope : local
Dragging : 0
Send Component ID: disabled
Events
Touch Press Event
climatesetting.txt="{\"page\": \"climate\", \"component\": \"close\", \"value\": \"press\"}"
printh 92
prints "nspanelevent",0
printh 00
prints climatesetting.txt,0
printh 00
printh FF FF FF
Touch Release Event
climatesetting.txt="{\"page\": \"climate\", \"component\": \"close\", \"value\": \"release\"}"
printh 92
prints "nspanelevent",0
printh 00
prints climatesetting.txt,0
printh 00
printh FF FF FF
Hotspot hotwater_bt
Attributes
ID : 18
Scope : local
Dragging : 0
Send Component ID: disabled
Events
Touch Press Event
climatesetting.txt="{\"page\": \"climate\", \"component\": \"hotwater\", \"value\": \"press\"}"
printh 92
prints "nspanelevent",0
printh 00
prints climatesetting.txt,0
printh 00
printh FF FF FF
Touch Release Event
climatesetting.txt="{\"page\": \"climate\", \"component\": \"hotwater\", \"value\": \"release\"}"
printh 92
prints "nspanelevent",0
printh 00
prints climatesetting.txt,0
printh 00
printh FF FF FF
Hotspot heating_bt
Attributes
ID : 20
Scope : local
Dragging : 0
Send Component ID: disabled
Events
Touch Press Event
climatesetting.txt="{\"page\": \"climate\", \"component\": \"heating\", \"value\": \"press\"}"
printh 92
prints "nspanelevent",0
printh 00
prints climatesetting.txt,0
printh 00
printh FF FF FF
Touch Release Event
climatesetting.txt="{\"page\": \"climate\", \"component\": \"heating\", \"value\": \"release\"}"
printh 92
prints "nspanelevent",0
printh 00
prints climatesetting.txt,0
printh 00
printh FF FF FF
Timer swipestore
Attributes
ID : 2
Scope : local
Period (ms): 50
Enabled : no
Events
Timer Event
swipex=tch0
swipey=tch1
Timer slider
Attributes
ID : 6
Scope : local
Period (ms): 50
Enabled : no
Events
Timer Event
// Left hand images vertical
if(tch0>=111&&tch0<169) // Left Hand images L/R coords
{
if(tch1>221&&tch1<=235) // step 0
{
// climatesetting.txt="climateslider0"
climatesetting.txt="{\"page\": \"climate\", \"component\": \"climateslider\", \"value\": 0}"
printh 92
prints "nspanelevent",0
printh 00
prints climatesetting.txt,0
printh 00
printh FF FF FF
}else if(tch1>206&&tch1<=221) // step 1
{
// climatesetting.txt="climateslider1"
climatesetting.txt="{\"page\": \"climate\", \"component\": \"climateslider\", \"value\": 1}"
printh 92
prints "nspanelevent",0
printh 00
prints climatesetting.txt,0
printh 00
printh FF FF FF
}else if(tch1>192&&tch1<=206) // step 2
{
// climatesetting.txt="climateslider2"
climatesetting.txt="{\"page\": \"climate\", \"component\": \"climateslider\", \"value\": 2}"
printh 92
prints "nspanelevent",0
printh 00
prints climatesetting.txt,0
printh 00
printh FF FF FF
}else if(tch1>177&&tch1<=192) // step 3
{
// climatesetting.txt="climateslider3"
climatesetting.txt="{\"page\": \"climate\", \"component\": \"climateslider\", \"value\": 3}"
printh 92
prints "nspanelevent",0
printh 00
prints climatesetting.txt,0
printh 00
printh FF FF FF
}else if(tch1>162&&tch1<=177) // step 4
{
// climatesetting.txt="climateslider4"
climatesetting.txt="{\"page\": \"climate\", \"component\": \"climateslider\", \"value\": 4}"
printh 92
prints "nspanelevent",0
printh 00
prints climatesetting.txt,0
printh 00
printh FF FF FF
}else if(tch1>148&&tch1<=162) // step 5 up
{
// climatesetting.txt="climateslider5"
climatesetting.txt="{\"page\": \"climate\", \"component\": \"climateslider\", \"value\": 5}"
printh 92
prints "nspanelevent",0
printh 00
prints climatesetting.txt,0
printh 00
printh FF FF FF
}else if(tch1>133&&tch1<=148) // step 6 up
{
// climatesetting.txt="climateslider6"
climatesetting.txt="{\"page\": \"climate\", \"component\": \"climateslider\", \"value\": 6}"
printh 92
prints "nspanelevent",0
printh 00
prints climatesetting.txt,0
printh 00
printh FF FF FF
}else if(tch1>119&&tch1<=133) // step 7 up
{
// climatesetting.txt="climateslider7"
climatesetting.txt="{\"page\": \"climate\", \"component\": \"climateslider\", \"value\": 7}"
printh 92
prints "nspanelevent",0
printh 00
prints climatesetting.txt,0
printh 00
printh FF FF FF
}else if(tch1>105&&tch1<=119) // step 8 up
{
// climatesetting.txt="climateslider8"
climatesetting.txt="{\"page\": \"climate\", \"component\": \"climateslider\", \"value\": 8}"
printh 92
prints "nspanelevent",0
printh 00
prints climatesetting.txt,0
printh 00
printh FF FF FF
}else if(tch1>90&&tch1<=105) // step 9 up
{
// climatesetting.txt="climateslider9"
climatesetting.txt="{\"page\": \"climate\", \"component\": \"climateslider\", \"value\": 9}"
printh 92
prints "nspanelevent",0
printh 00
prints climatesetting.txt,0
printh 00
printh FF FF FF
}else if(tch1>70&&tch1<=90) // step 10 up
{
// climatesetting.txt="climateslider10"
climatesetting.txt="{\"page\": \"climate\", \"component\": \"climateslider\", \"value\": 10}"
printh 92
prints "nspanelevent",0
printh 00
prints climatesetting.txt,0
printh 00
printh FF FF FF
}else if(tch1>60&&tch1<=70) // step 11 up
{
// climatesetting.txt="climateslider11"
climatesetting.txt="{\"page\": \"climate\", \"component\": \"climateslider\", \"value\": 11}"
printh 92
prints "nspanelevent",0
printh 00
prints climatesetting.txt,0
printh 00
printh FF FF FF
}
// middle images horizontal
}else if(tch1>=35&&tch1<=80) // middle image U/D coords
{
if(tch0>169&&tch0<=188) // step 12 across
{
// climatesetting.txt="climateslider12"
climatesetting.txt="{\"page\": \"climate\", \"component\": \"climateslider\", \"value\": 12}"
printh 92
prints "nspanelevent",0
printh 00
prints climatesetting.txt,0
printh 00
printh FF FF FF
}else if(tch0>188&&tch0<=207) // step 13
{
// climatesetting.txt="climateslider13"
climatesetting.txt="{\"page\": \"climate\", \"component\": \"climateslider\", \"value\": 13}"
printh 92
prints "nspanelevent",0
printh 00
prints climatesetting.txt,0
printh 00
printh FF FF FF
}else if(tch0>207&&tch0<=226) // step 14
{
// climatesetting.txt="climateslider14"
climatesetting.txt="{\"page\": \"climate\", \"component\": \"climateslider\", \"value\": 14}"
printh 92
prints "nspanelevent",0
printh 00
prints climatesetting.txt,0
printh 00
printh FF FF FF
}else if(tch0>226&&tch0<=245) // step 15
{
// climatesetting.txt="climateslider15"
climatesetting.txt="{\"page\": \"climate\", \"component\": \"climateslider\", \"value\": 15}"
printh 92
prints "nspanelevent",0
printh 00
prints climatesetting.txt,0
printh 00
printh FF FF FF
}else if(tch0>245&&tch0<=264) // step 16
{
// climatesetting.txt="climateslider16"
climatesetting.txt="{\"page\": \"climate\", \"component\": \"climateslider\", \"value\": 16}"
printh 92
prints "nspanelevent",0
printh 00
prints climatesetting.txt,0
printh 00
printh FF FF FF
}else if(tch0>264&&tch0<=283) // step 17
{
// climatesetting.txt="climateslider17"
climatesetting.txt="{\"page\": \"climate\", \"component\": \"climateslider\", \"value\": 17}"
printh 92
prints "nspanelevent",0
printh 00
prints climatesetting.txt,0
printh 00
printh FF FF FF
}
// right hand images vertical
}else if(tch0>=283&&tch0<=341) // right image L/R coords
{
if(tch1>60&&tch1<=80) // step 18 across
{
// climatesetting.txt="climateslider18"
climatesetting.txt="{\"page\": \"climate\", \"component\": \"climateslider\", \"value\": 18}"
printh 92
prints "nspanelevent",0
printh 00
prints climatesetting.txt,0
printh 00
printh FF FF FF
}else if(tch1>80&&tch1<=94) // step 19
{
// climatesetting.txt="climateslider19"
climatesetting.txt="{\"page\": \"climate\", \"component\": \"climateslider\", \"value\": 19}"
printh 92
prints "nspanelevent",0
printh 00
prints climatesetting.txt,0
printh 00
printh FF FF FF
}else if(tch1>94&&tch1<=109) // step 20
{
// climatesetting.txt="climateslider20"
climatesetting.txt="{\"page\": \"climate\", \"component\": \"climateslider\", \"value\": 20}"
printh 92
prints "nspanelevent",0
printh 00
prints climatesetting.txt,0
printh 00
printh FF FF FF
}else if(tch1>109&&tch1<=123) // step 21
{
// climatesetting.txt="climateslider21"
climatesetting.txt="{\"page\": \"climate\", \"component\": \"climateslider\", \"value\": 21}"
printh 92
prints "nspanelevent",0
printh 00
prints climatesetting.txt,0
printh 00
printh FF FF FF
}else if(tch1>123&&tch1<=138) // step 22
{
// climatesetting.txt="climateslider22"
climatesetting.txt="{\"page\": \"climate\", \"component\": \"climateslider\", \"value\": 22}"
printh 92
prints "nspanelevent",0
printh 00
prints climatesetting.txt,0
printh 00
printh FF FF FF
}else if(tch1>138&&tch1<=152) // step 23
{
// climatesetting.txt="climateslider23"
climatesetting.txt="{\"page\": \"climate\", \"component\": \"climateslider\", \"value\": 23}"
printh 92
prints "nspanelevent",0
printh 00
prints climatesetting.txt,0
printh 00
printh FF FF FF
}else if(tch1>152&&tch1<=167) // step 24
{
// climatesetting.txt="climateslider24"
climatesetting.txt="{\"page\": \"climate\", \"component\": \"climateslider\", \"value\": 24}"
printh 92
prints "nspanelevent",0
printh 00
prints climatesetting.txt,0
printh 00
printh FF FF FF
}else if(tch1>167&&tch1<=181) // step 25
{
// climatesetting.txt="climateslider25"
climatesetting.txt="{\"page\": \"climate\", \"component\": \"climateslider\", \"value\": 25}"
printh 92
prints "nspanelevent",0
printh 00
prints climatesetting.txt,0
printh 00
printh FF FF FF
}else if(tch1>181&&tch1<=197) // step 26
{
// climatesetting.txt="climateslider26"
climatesetting.txt="{\"page\": \"climate\", \"component\": \"climateslider\", \"value\": 26}"
printh 92
prints "nspanelevent",0
printh 00
prints climatesetting.txt,0
printh 00
printh FF FF FF
}else if(tch1>197&&tch1<=215) // step 27
{
// climatesetting.txt="climateslider27"
climatesetting.txt="{\"page\": \"climate\", \"component\": \"climateslider\", \"value\": 27}"
printh 92
prints "nspanelevent",0
printh 00
prints climatesetting.txt,0
printh 00
printh FF FF FF
}else if(tch1>215&&tch1<=235) // step 28
{
// climatesetting.txt="climateslider28"
climatesetting.txt="{\"page\": \"climate\", \"component\": \"climateslider\", \"value\": 28}"
printh 92
prints "nspanelevent",0
printh 00
prints climatesetting.txt,0
printh 00
printh FF FF FF
}
}
// pass climateslider.val
TouchCap swipe
Attributes
ID : 1
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
}
}