From 58bc0c1f1e157c4ef2372da19b22a0329b0a9ebb Mon Sep 17 00:00:00 2001 From: joBr99 <29555657+joBr99@users.noreply.github.com> Date: Sat, 21 Jan 2023 20:34:26 +0100 Subject: [PATCH] refactor screensaver --- HMI/README.md | 413 +++++++++++++++++- HMI/code_gen/pages/out.txt | 402 +++++++++++++++++ HMI/code_gen/pages/screensaver.py | 313 +++++++++++++ HMI/nspanel.HMI | Bin 9475267 -> 9475267 bytes HMI/nspanel.tft | Bin 8096100 -> 8098304 bytes apps/nspanel-lovelace-ui/luibackend/config.py | 3 +- apps/nspanel-lovelace-ui/luibackend/pages.py | 165 +++---- apps/nspanel-lovelace-ui/luibackend/theme.py | 21 - 8 files changed, 1191 insertions(+), 126 deletions(-) create mode 100644 HMI/code_gen/pages/out.txt create mode 100644 HMI/code_gen/pages/screensaver.py diff --git a/HMI/README.md b/HMI/README.md index 7950e59f..164155c8 100644 --- a/HMI/README.md +++ b/HMI/README.md @@ -94,9 +94,418 @@ change the page type: ### screensaver page -`weatherUpdate~tMainIcon~tMainText~tForecast1~tF1Icon~tForecast1Val~tForecast2~tF2Icon~tForecast2Val~tForecast3~tF3Icon~tForecast3Val~tForecast4~tF4Icon~tForecast4Val~optionalLayoutIcon~optionalLayoutText~altIconFont~altIconFont` +Example default layout: `weatherUpdate~~~A~21130~~-0.7C~~~B~63469~Sat~3.6C~~~C~35957~Sun~3.9C~~~D~31728~Mon~4.3C~~~E~35957~Tue~3.6C` +Example alternative layout: `weatherUpdate~~~A~21130~~-0.7C~~~B~63469~Sat~3.6C~~~C~35957~Sun~3.9C~~~D~31728~Mon~4.3C~~~E~35957~Tue~3.6C~~~F~21130~~23.6C` -`color~background~time~timeAMPM~date~tMainIcon~tMainText~tForecast1~tForecast2~tForecast3~tForecast4~tF1Icon~tF2Icon~tF3Icon~tF4Icon~tForecast1Val~tForecast2Val~tForecast3Val~tForecast4Val~bar~tMRIcon~tMR` +
| Parameter Number | +Category | +Location | +Type | +Field | +Addional Information | +
|---|---|---|---|---|---|
| 0 | +instruction | ++ | instruction | +weatherupdate | ++ |
| 1 | ++ | Main Icon | +Entity Definition | +type | +ignored | +
| 2 | ++ | intNameEntity | +ignored | +||
| 3 | ++ | icon | ++ | ||
| 4 | ++ | iconColor | ++ | ||
| 5 | ++ | displayName | +ignored | +||
| 6 | ++ | optionalValue | ++ | ||
| 7 | ++ | First Forecast Icon | +Entity Definition | +type | +ignored | +
| 8 | ++ | intNameEntity | +ignored | +||
| 9 | ++ | icon | ++ | ||
| 10 | ++ | iconColor | ++ | ||
| 11 | ++ | displayName | ++ | ||
| 12 | ++ | optionalValue | ++ | ||
| 13 | ++ | Second Forecast Icon | +Entity Definition | +type | +ignored | +
| 14 | ++ | intNameEntity | +ignored | +||
| 15 | ++ | icon | ++ | ||
| 16 | ++ | iconColor | ++ | ||
| 17 | ++ | displayName | ++ | ||
| 18 | ++ | optionalValue | ++ | ||
| 19 | ++ | Third Forecast Icon | +Entity Definition | +type | +ignored | +
| 20 | ++ | intNameEntity | +ignored | +||
| 21 | ++ | icon | ++ | ||
| 22 | ++ | iconColor | ++ | ||
| 23 | ++ | displayName | ++ | ||
| 24 | ++ | optionalValue | ++ | ||
| 25 | ++ | Fourth Forecast Icon | +Entity Definition | +type | +ignored | +
| 26 | ++ | intNameEntity | +ignored | +||
| 27 | ++ | icon | ++ | ||
| 28 | ++ | iconColor | ++ | ||
| 29 | ++ | displayName | ++ | ||
| 30 | ++ | optionalValue | ++ | ||
| 31 | ++ | Alternative Layout Icon | +Entity Definition | +type | +ignored | +
| 32 | ++ | intNameEntity | +ignored | +||
| 33 | ++ | icon | ++ | ||
| 34 | ++ | iconColor | ++ | ||
| 35 | ++ | displayName | +ignored | +||
| 36 | ++ | optionalValue | ++ |
| Parameter Number | +Category | +Location | +Type | +Field | +Addional Information | +
|---|---|---|---|---|---|
| 0 | +instruction | +color | ++ | ||
| 1 | ++ | + | + | background | ++ |
| 2 | ++ | + | + | tTime | ++ |
| 3 | ++ | + | + | timeAMPM | ++ |
| 4 | ++ | + | + | tDate | ++ |
| 5 | ++ | + | + | tMainText | ++ |
| 6 | ++ | + | + | tForecast1 | ++ |
| 7 | ++ | + | + | tForecast2 | ++ |
| 8 | ++ | + | + | tForecast3 | ++ |
| 9 | ++ | + | + | tForecast4 | ++ |
| 10 | ++ | + | + | tForecast1Val | ++ |
| 11 | ++ | + | + | tForecast2Val | ++ |
| 12 | ++ | + | + | tForecast3Val | ++ |
| 13 | ++ | + | + | tForecast4Val | ++ |
| 14 | ++ | + | + | bar | ++ |
| 15 | ++ | + | + | tMainTextAlt2 | ++ |
| 16 | ++ | + | + | tMR | ++ |
| 17 | ++ | + | + | tTimeAdd | ++ |
( &g72<#0`8RYC8W|nO}r4DgMH(>p?6D>Egj%X5{<6z3BNde)|k@&oe
zsPAaB@Q6y@Zn~n%m%=SV3ppo(8-yPvpT7wFS>Ue%e`AP({^=>`@2a4sN?#U I@zm#8vy>|Q?zCFKVRs7o&DO#%tF{(a}Ql<-I^}Xw+pyFJ4
zeQ9srPj2G_i~sHoyuWtx
sw*=kteL)xBw*=kteL)xB7oqsRCHO4g*TYv;Wtuw(ZVF5X9=Q|;9?g{O
zX2N|DKAFwUmU!@73f?wUB6iDDR
cNhFCg6HQ6&&FJ$lL&MK7o5#U_0%=