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,12 +13,18 @@ Page notification
Events
Preinitialize Event
dim=home.brightness.val
printh 92
prints "nspanelevent",0
printh 00
prints "{\"page\": \"notification\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0
printh 00
printh FF FF FF
if(home.api.val==0)
{
page home
}else
{
printh 92
prints "nspanelevent",0
printh 00
prints "{\"page\": \"notification\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0
printh 00
printh FF FF FF
}
Touch Press Event
printh 92

View File

@@ -13,12 +13,18 @@ Page qrcode
Events
Preinitialize Event
dim=home.brightness.val
printh 92
prints "nspanelevent",0
printh 00
prints "{\"page\": \"qrcode\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0
printh 00
printh FF FF FF
if(home.api.val==0)
{
page home
}else
{
printh 92
prints "nspanelevent",0
printh 00
prints "{\"page\": \"qrcode\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0
printh 00
printh FF FF FF
}
Touch Press Event
printh 92

View File

@@ -21,7 +21,7 @@ Page screensaver
printh FF FF FF
Touch Release Event
page home
page orign.val
Variable (int32) orign
Attributes