Panel offline mode (#900)

* Panel offline mode

Introduces "offline mode" for the panel, which will be used later with a fallback climate.

Pages that are depending on the blueprint (buttons pages, entity pages, settings pages, etc) won't be shown when the API is disconnected.

* Panel offline mode

* Panel offline mode

* Panel offline mode

* Panel offline mode
This commit is contained in:
Edward Firmo
2023-06-30 12:24:25 +02:00
committed by GitHub
parent ec48fbd335
commit 3aca4c64d2
24 changed files with 379 additions and 102 deletions

View File

@@ -13,14 +13,20 @@ Page cover
Events
Preinitialize Event
dim=home.brightness.val
coversetting.txt="{\"page\": \"cover\", \"component\": \"currentpage\", \"value\": \"pagechange\", \"entity\": \""+home.entity.txt+"\"}"
printh 92
prints "nspanelevent",0
printh 00
prints coversetting.txt,0
printh 00
printh FF FF FF
page_label.txt=home.entity.txt
if(home.api.val==0)
{
page home
}else
{
coversetting.txt="{\"page\": \"cover\", \"component\": \"currentpage\", \"value\": \"pagechange\", \"entity\": \""+home.entity.txt+"\"}"
printh 92
prints "nspanelevent",0
printh 00
prints coversetting.txt,0
printh 00
printh FF FF FF
page_label.txt=home.entity.txt
}
Touch Press Event
coversetting.txt="{\"page\": \"cover\", \"component\": \"touchevent\", \"value\": \"press\", \"entity\": \""+home.entity.txt+"\"}"