Remove entity info from pages on TFT
Since v3.4, the info about entity_id shown was going all the way to Nextion and then sent back in the json return, however this requires a long (100-char) global var and the way it was implemented, it was one of those per settings page, as climate should be also recorded at the same time in case the embedded climate was installed. This was taking too much memory, so I've moved this info to a global variable (string) in ESPHome. There is now lots of space for code cleaning (and still pending to do the same with climate entity, as it could be only a bool to inform if embedded), but this brings the functionality. This enabled the return to global for some components, so it probably solves #1031
This commit is contained in:
@@ -17,11 +17,10 @@ Page light
|
||||
page home
|
||||
}else
|
||||
{
|
||||
lightsetting.txt="{\"page\": \"light\", \"component\": \"currentpage\", \"value\": \"pagechange\", \"entity\": \""+entity.txt+"\"}"
|
||||
printh 92
|
||||
prints "nspanelevent",0
|
||||
printh 00
|
||||
prints lightsetting.txt,0
|
||||
prints "{\"page\": \"light\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
vis light_b_press,1
|
||||
@@ -105,13 +104,6 @@ Variable (string) back_page
|
||||
Text : home
|
||||
Max. Text Size: 15
|
||||
|
||||
Variable (string) entity
|
||||
Attributes
|
||||
ID : 33
|
||||
Scope : global
|
||||
Text :
|
||||
Max. Text Size: 100
|
||||
|
||||
Number ring
|
||||
Attributes
|
||||
ID : 4
|
||||
@@ -385,7 +377,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+"]}"
|
||||
printh 92
|
||||
prints "nspanelevent",0
|
||||
printh 00
|
||||
@@ -411,7 +403,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\", \"key\": \"brightness_pct\", \"value\": "+va1.txt+", \"entity\": \""+entity.txt+"\"}"
|
||||
lightsetting.txt="{\"page\": \"light\", \"key\": \"brightness_pct\", \"value\": "+va1.txt+"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
@@ -434,7 +426,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\", \"key\": \"color_temp\", \"value\": "+va1.txt+", \"entity\": \""+entity.txt+"\"}"
|
||||
lightsetting.txt="{\"page\": \"light\", \"key\": \"color_temp\", \"value\": "+va1.txt+"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
@@ -649,7 +641,7 @@ Timer swipestore
|
||||
|
||||
Timer wakeup_timer
|
||||
Attributes
|
||||
ID : 34
|
||||
ID : 33
|
||||
Scope : local
|
||||
Period (ms): 100
|
||||
Enabled : yes
|
||||
|
||||
Reference in New Issue
Block a user