Move entity variable to home page (#889)
* Move `entity` variable to home page This will enable future development of a fallback climate * Move `entity` variable to home page * Move `entity` variable to home page * Move `entity` variable to home page * Move `entity` variable to home page
This commit is contained in:
@@ -13,7 +13,7 @@ Page light
|
||||
Events
|
||||
Preinitialize Event
|
||||
dim=home.brightness.val
|
||||
lightsetting.txt="{\"page\": \"light\", \"component\": \"currentpage\", \"value\": \"pagechange\", \"entity\": \""+entity.txt+"\"}"
|
||||
lightsetting.txt="{\"page\": \"light\", \"component\": \"currentpage\", \"value\": \"pagechange\", \"entity\": \""+home.entity.txt+"\"}"
|
||||
printh 92
|
||||
prints "nspanelevent",0
|
||||
printh 00
|
||||
@@ -33,9 +33,10 @@ Page light
|
||||
// #### OFF Slider #####
|
||||
vis tempslider,0
|
||||
vis colorwheel,0
|
||||
page_label.txt=home.entity.txt
|
||||
|
||||
Touch Press Event
|
||||
lightsetting.txt="{\"page\": \"light\", \"component\": \"touchevent\", \"value\": \"press\", \"entity\": \""+entity.txt+"\"}"
|
||||
lightsetting.txt="{\"page\": \"light\", \"component\": \"touchevent\", \"value\": \"press\", \"entity\": \""+home.entity.txt+"\"}"
|
||||
printh 92
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
@@ -44,7 +45,7 @@ Page light
|
||||
printh FF FF FF
|
||||
|
||||
Touch Release Event
|
||||
lightsetting.txt="{\"page\": \"light\", \"component\": \"touchevent\", \"value\": \"release\", \"entity\": \""+entity.txt+"\"}"
|
||||
lightsetting.txt="{\"page\": \"light\", \"component\": \"touchevent\", \"value\": \"release\", \"entity\": \""+home.entity.txt+"\"}"
|
||||
printh 92
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
@@ -52,6 +53,9 @@ Page light
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
|
||||
Page Exit Event
|
||||
home.entity.txt=""
|
||||
|
||||
Variable (int32) rgb565
|
||||
Attributes
|
||||
ID : 22
|
||||
@@ -92,16 +96,9 @@ Variable (string) lightsetting
|
||||
Text :
|
||||
Max. Text Size: 255
|
||||
|
||||
Variable (string) entity
|
||||
Attributes
|
||||
ID : 33
|
||||
Scope : global
|
||||
Text :
|
||||
Max. Text Size: 100
|
||||
|
||||
Variable (string) back_page
|
||||
Attributes
|
||||
ID : 34
|
||||
ID : 33
|
||||
Scope : local
|
||||
Text : home
|
||||
Max. Text Size: 15
|
||||
@@ -379,7 +376,7 @@ Picture colorwheel
|
||||
covx r,va1.txt,0,0
|
||||
covx g,va2.txt,0,0
|
||||
covx b,va3.txt,0,0
|
||||
lightsetting.txt="{\"page\": \"light\", \"component\": \"rgb_color\", \"value\": ["+va1.txt+","+va2.txt+","+va3.txt+"], \"entity\": \""+entity.txt+"\"}"
|
||||
lightsetting.txt="{\"page\": \"light\", \"component\": \"rgb_color\", \"value\": ["+va1.txt+","+va2.txt+","+va3.txt+"], \"entity\": \""+home.entity.txt+"\"}"
|
||||
printh 92
|
||||
prints "nspanelevent",0
|
||||
printh 00
|
||||
@@ -412,7 +409,7 @@ Slider lightslider
|
||||
covx lightslider.val,va1.txt,0,0
|
||||
light_value.txt=va1.txt+"%"
|
||||
light_value_2.txt=va1.txt+"%"
|
||||
lightsetting.txt="{\"page\": \"light\", \"component\": \"brightness_pct\", \"value\": "+va1.txt+", \"entity\": \""+entity.txt+"\"}"
|
||||
lightsetting.txt="{\"page\": \"light\", \"component\": \"brightness_pct\", \"value\": "+va1.txt+", \"entity\": \""+home.entity.txt+"\"}"
|
||||
printh 92
|
||||
prints "nspanelevent",0
|
||||
printh 00
|
||||
@@ -435,7 +432,7 @@ Slider tempslider
|
||||
covx tempslider.val,va1.txt,0,0
|
||||
temp_value.txt=va1.txt
|
||||
temp_value_2.txt=va1.txt
|
||||
lightsetting.txt="{\"page\": \"light\", \"component\": \"color_temp\", \"value\": "+va1.txt+", \"entity\": \""+entity.txt+"\"}"
|
||||
lightsetting.txt="{\"page\": \"light\", \"component\": \"color_temp\", \"value\": "+va1.txt+", \"entity\": \""+home.entity.txt+"\"}"
|
||||
printh 92
|
||||
prints "nspanelevent",0
|
||||
printh 00
|
||||
|
||||
Reference in New Issue
Block a user