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 fan
|
||||
page home
|
||||
}else
|
||||
{
|
||||
fansetting.txt="{\"page\": \"fan\", \"component\": \"currentpage\", \"value\": \"pagechange\", \"entity\": \""+entity.txt+"\"}"
|
||||
printh 92
|
||||
prints "nspanelevent",0
|
||||
printh 00
|
||||
prints fansetting.txt,0
|
||||
prints "{\"page\": \"fan\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
}
|
||||
@@ -61,13 +60,6 @@ Variable (string) va0
|
||||
Text :
|
||||
Max. Text Size: 10
|
||||
|
||||
Variable (string) entity
|
||||
Attributes
|
||||
ID : 16
|
||||
Scope : global
|
||||
Text :
|
||||
Max. Text Size: 100
|
||||
|
||||
Text fan_value
|
||||
Attributes
|
||||
ID : 1
|
||||
@@ -272,7 +264,7 @@ Button button_off
|
||||
sys0=100*fanslider.val/fanslider.maxval
|
||||
covx sys0,va0.txt,0,0
|
||||
fan_value.txt=va0.txt+"%"
|
||||
fansetting.txt="{\"page\": \"fan\", \"key\": \"stop\", \"value\": "+va0.txt+", \"entity\": \""+entity.txt+"\"}"
|
||||
fansetting.txt="{\"page\": \"fan\", \"key\": \"stop\", \"value\": "+va0.txt+"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
@@ -353,7 +345,7 @@ Timer timer0
|
||||
sys0=100*fanslider.val/fanslider.maxval
|
||||
covx sys0,va0.txt,0,0
|
||||
fan_value.txt=va0.txt+"%"
|
||||
fansetting.txt="{\"page\": \"fan\", \"key\": \"percentage\", \"value\": "+va0.txt+", \"entity\": \""+entity.txt+"\"}"
|
||||
fansetting.txt="{\"page\": \"fan\", \"key\": \"percentage\", \"value\": "+va0.txt+"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
@@ -363,7 +355,7 @@ Timer timer0
|
||||
|
||||
Timer wakeup_timer
|
||||
Attributes
|
||||
ID : 17
|
||||
ID : 16
|
||||
Scope : local
|
||||
Period (ms): 100
|
||||
Enabled : yes
|
||||
|
||||
Reference in New Issue
Block a user