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 cover
|
||||
page home
|
||||
}else
|
||||
{
|
||||
coversetting.txt="{\"page\": \"cover\", \"component\": \"currentpage\", \"value\": \"pagechange\", \"entity\": \""+entity.txt+"\"}"
|
||||
printh 92
|
||||
prints "nspanelevent",0
|
||||
printh 00
|
||||
prints coversetting.txt,0
|
||||
prints "{\"page\": \"cover\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
}
|
||||
@@ -61,13 +60,6 @@ Variable (string) back_page
|
||||
Text : home
|
||||
Max. Text Size: 15
|
||||
|
||||
Variable (string) entity
|
||||
Attributes
|
||||
ID : 14
|
||||
Scope : global
|
||||
Text :
|
||||
Max. Text Size: 100
|
||||
|
||||
Text battery_value
|
||||
Attributes
|
||||
ID : 1
|
||||
@@ -132,7 +124,7 @@ Slider coverslider
|
||||
Touch Release Event
|
||||
covx coverslider.val,va1.txt,0,0
|
||||
cover_value.txt=va1.txt+"%"
|
||||
coversetting.txt="{\"page\": \"cover\", \"key\": \"position\", \"value\": "+va1.txt+", \"entity\": \""+entity.txt+"\"}"
|
||||
coversetting.txt="{\"page\": \"cover\", \"key\": \"position\", \"value\": "+va1.txt+"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
@@ -152,11 +144,10 @@ Button cover_open
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
coversetting.txt="{\"page\": \"cover\", \"key\": \"open_cover\", \"value\": \"press\", \"entity\": \""+entity.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints coversetting.txt,0
|
||||
prints "{\"page\": \"cover\", \"key\": \"open_cover\", \"value\": \"press\"}",0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
|
||||
@@ -172,11 +163,10 @@ Button cover_close
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
coversetting.txt="{\"page\": \"cover\", \"key\": \"close_cover\", \"value\": \"press\", \"entity\": \""+entity.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints coversetting.txt,0
|
||||
prints "{\"page\": \"cover\", \"key\": \"close_cover\", \"value\": \"press\"}",0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
|
||||
@@ -192,11 +182,10 @@ Button cover_stop
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
coversetting.txt="{\"page\": \"cover\", \"key\": \"stop_cover\", \"value\": \"press\", \"entity\": \""+entity.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints coversetting.txt,0
|
||||
prints "{\"page\": \"cover\", \"key\": \"stop_cover\", \"value\": \"press\"}",0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
|
||||
@@ -231,7 +220,7 @@ Button button_back
|
||||
|
||||
Timer wakeup_timer
|
||||
Attributes
|
||||
ID : 15
|
||||
ID : 14
|
||||
Scope : local
|
||||
Period (ms): 100
|
||||
Enabled : yes
|
||||
|
||||
Reference in New Issue
Block a user