From a4cbe27f09c5b6fba66b15ca524b2a7323be22be Mon Sep 17 00:00:00 2001 From: joBr99 <29555657+joBr99@users.noreply.github.com> Date: Sat, 28 May 2022 05:04:52 +0000 Subject: [PATCH 1/2] Merge branch 'main' of https://github.com/joBr99/nspanel-lovelace-ui (add nextion2text) --- HMI/US/landscape/diff-eu-version.txt | 29 ++++++++---- HMI/US/portrait/diff-eu-version.txt | 46 +++++++++++++++---- HMI/US/portrait/diff-filtered.txt | 25 +++++----- .../n2t-out-visual/nspanel_US_P_Stats.txt | 12 ++--- .../portrait/n2t-out-visual/screensaver.txt | 18 +------- HMI/US/portrait/n2t-out/screensaver.txt | 18 +------- HMI/n2t-out-visual/nspanel_Stats.txt | 8 ++-- HMI/n2t-out-visual/screensaver.txt | 2 + HMI/n2t-out/screensaver.txt | 2 + 9 files changed, 87 insertions(+), 73 deletions(-) diff --git a/HMI/US/landscape/diff-eu-version.txt b/HMI/US/landscape/diff-eu-version.txt index 10a81c79..fd3da4a6 100644 --- a/HMI/US/landscape/diff-eu-version.txt +++ b/HMI/US/landscape/diff-eu-version.txt @@ -1,6 +1,6 @@ diff -bur HMI/n2t-out/Program.s.txt HMI/US/landscape/n2t-out/Program.s.txt ---- HMI/n2t-out/Program.s.txt 2022-05-27 20:18:08.893442508 +0000 -+++ HMI/US/landscape/n2t-out/Program.s.txt 2022-05-27 20:18:09.913490467 +0000 +--- HMI/n2t-out/Program.s.txt 2022-05-28 05:04:50.360986275 +0000 ++++ HMI/US/landscape/n2t-out/Program.s.txt 2022-05-28 05:04:51.228984325 +0000 @@ -11,6 +11,4 @@ // dim value int dimValue=40 @@ -9,8 +9,8 @@ diff -bur HMI/n2t-out/Program.s.txt HMI/US/landscape/n2t-out/Program.s.txt - lcd_dev fffb 0002 0000 0020 page pageStartup diff -bur HMI/n2t-out/cardQR.txt HMI/US/landscape/n2t-out/cardQR.txt ---- HMI/n2t-out/cardQR.txt 2022-05-27 20:18:08.893442508 +0000 -+++ HMI/US/landscape/n2t-out/cardQR.txt 2022-05-27 20:18:09.913490467 +0000 +--- HMI/n2t-out/cardQR.txt 2022-05-28 05:04:50.364986253 +0000 ++++ HMI/US/landscape/n2t-out/cardQR.txt 2022-05-28 05:04:51.232984331 +0000 @@ -34,7 +34,7 @@ Attributes Scope : local @@ -21,8 +21,8 @@ diff -bur HMI/n2t-out/cardQR.txt HMI/US/landscape/n2t-out/cardQR.txt Variable (string) entn Attributes diff -bur HMI/n2t-out/pageStartup.txt HMI/US/landscape/n2t-out/pageStartup.txt ---- HMI/n2t-out/pageStartup.txt 2022-05-27 20:18:08.893442508 +0000 -+++ HMI/US/landscape/n2t-out/pageStartup.txt 2022-05-27 20:18:09.913490467 +0000 +--- HMI/n2t-out/pageStartup.txt 2022-05-28 05:04:50.364986253 +0000 ++++ HMI/US/landscape/n2t-out/pageStartup.txt 2022-05-28 05:04:51.228984325 +0000 @@ -177,7 +177,7 @@ recmod=1 bauds=115200 @@ -33,8 +33,8 @@ diff -bur HMI/n2t-out/pageStartup.txt HMI/US/landscape/n2t-out/pageStartup.txt btlen tSend.txt,sys0 crcrest 1,0xffff // reset CRC diff -bur HMI/n2t-out/popupLight.txt HMI/US/landscape/n2t-out/popupLight.txt ---- HMI/n2t-out/popupLight.txt 2022-05-27 20:18:08.893442508 +0000 -+++ HMI/US/landscape/n2t-out/popupLight.txt 2022-05-27 20:18:09.913490467 +0000 +--- HMI/n2t-out/popupLight.txt 2022-05-28 05:04:50.364986253 +0000 ++++ HMI/US/landscape/n2t-out/popupLight.txt 2022-05-28 05:04:51.228984325 +0000 @@ -209,9 +209,6 @@ sys0=sys0-pColorWheel.y covx sys0,tTmp.txt,0,0 @@ -46,8 +46,8 @@ diff -bur HMI/n2t-out/popupLight.txt HMI/US/landscape/n2t-out/popupLight.txt btlen tSend.txt,sys0 crcrest 1,0xffff // reset CRC diff -bur HMI/n2t-out/screensaver.txt HMI/US/landscape/n2t-out/screensaver.txt ---- HMI/n2t-out/screensaver.txt 2022-05-27 20:18:08.893442508 +0000 -+++ HMI/US/landscape/n2t-out/screensaver.txt 2022-05-27 20:18:09.913490467 +0000 +--- HMI/n2t-out/screensaver.txt 2022-05-28 05:04:50.364986253 +0000 ++++ HMI/US/landscape/n2t-out/screensaver.txt 2022-05-28 05:04:51.232984331 +0000 @@ -62,12 +62,6 @@ Text : Max. Text Size: 50 @@ -120,3 +120,12 @@ diff -bur HMI/n2t-out/screensaver.txt HMI/US/landscape/n2t-out/screensaver.txt } if(tInstruction.txt=="color") { +@@ -513,8 +489,6 @@ + tMRIcon.bco=tTime.bco + tMR.bco=tTime.bco + tMRIcon.bco=tTime.bco +- tIcon1.bco=tTime.bco +- tIcon2.bco=tTime.bco + tForecast1.bco=tTime.bco + tForecast1Val.bco=tTime.bco + tF1Icon.bco=tTime.bco diff --git a/HMI/US/portrait/diff-eu-version.txt b/HMI/US/portrait/diff-eu-version.txt index 1f49fa13..21ad70d6 100644 --- a/HMI/US/portrait/diff-eu-version.txt +++ b/HMI/US/portrait/diff-eu-version.txt @@ -1,6 +1,6 @@ diff -bur HMI/n2t-out/Program.s.txt HMI/US/portrait/n2t-out/Program.s.txt ---- HMI/n2t-out/Program.s.txt 2022-05-27 20:18:08.893442508 +0000 -+++ HMI/US/portrait/n2t-out/Program.s.txt 2022-05-27 20:18:09.393466017 +0000 +--- HMI/n2t-out/Program.s.txt 2022-05-28 05:04:50.360986275 +0000 ++++ HMI/US/portrait/n2t-out/Program.s.txt 2022-05-28 05:04:50.784984016 +0000 @@ -11,6 +11,6 @@ // dim value int dimValue=40 @@ -11,8 +11,8 @@ diff -bur HMI/n2t-out/Program.s.txt HMI/US/portrait/n2t-out/Program.s.txt + //lcd_dev fffb 0002 0000 0020 page pageStartup diff -bur HMI/n2t-out/cardEntities.txt HMI/US/portrait/n2t-out/cardEntities.txt ---- HMI/n2t-out/cardEntities.txt 2022-05-27 20:18:08.893442508 +0000 -+++ HMI/US/portrait/n2t-out/cardEntities.txt 2022-05-27 20:18:09.397466205 +0000 +--- HMI/n2t-out/cardEntities.txt 2022-05-28 05:04:50.364986253 +0000 ++++ HMI/US/portrait/n2t-out/cardEntities.txt 2022-05-28 05:04:50.784984016 +0000 @@ -62,6 +62,16 @@ vis bText4,0 vis hSlider4,0 @@ -468,8 +468,8 @@ diff -bur HMI/n2t-out/cardEntities.txt HMI/US/portrait/n2t-out/cardEntities.txt if(tInstruction.txt=="pageType") { diff -bur HMI/n2t-out/cardQR.txt HMI/US/portrait/n2t-out/cardQR.txt ---- HMI/n2t-out/cardQR.txt 2022-05-27 20:18:08.893442508 +0000 -+++ HMI/US/portrait/n2t-out/cardQR.txt 2022-05-27 20:18:09.397466205 +0000 +--- HMI/n2t-out/cardQR.txt 2022-05-28 05:04:50.364986253 +0000 ++++ HMI/US/portrait/n2t-out/cardQR.txt 2022-05-28 05:04:50.784984016 +0000 @@ -34,7 +34,7 @@ Attributes Scope : local @@ -480,8 +480,8 @@ diff -bur HMI/n2t-out/cardQR.txt HMI/US/portrait/n2t-out/cardQR.txt Variable (string) entn Attributes diff -bur HMI/n2t-out/pageStartup.txt HMI/US/portrait/n2t-out/pageStartup.txt ---- HMI/n2t-out/pageStartup.txt 2022-05-27 20:18:08.893442508 +0000 -+++ HMI/US/portrait/n2t-out/pageStartup.txt 2022-05-27 20:18:09.397466205 +0000 +--- HMI/n2t-out/pageStartup.txt 2022-05-28 05:04:50.364986253 +0000 ++++ HMI/US/portrait/n2t-out/pageStartup.txt 2022-05-28 05:04:50.784984016 +0000 @@ -142,7 +142,7 @@ Disable release event after dragging: 0 Send Component ID : disabled @@ -501,8 +501,8 @@ diff -bur HMI/n2t-out/pageStartup.txt HMI/US/portrait/n2t-out/pageStartup.txt btlen tSend.txt,sys0 crcrest 1,0xffff // reset CRC diff -bur HMI/n2t-out/popupLight.txt HMI/US/portrait/n2t-out/popupLight.txt ---- HMI/n2t-out/popupLight.txt 2022-05-27 20:18:08.893442508 +0000 -+++ HMI/US/portrait/n2t-out/popupLight.txt 2022-05-27 20:18:09.397466205 +0000 +--- HMI/n2t-out/popupLight.txt 2022-05-28 05:04:50.364986253 +0000 ++++ HMI/US/portrait/n2t-out/popupLight.txt 2022-05-28 05:04:50.784984016 +0000 @@ -209,9 +209,6 @@ sys0=sys0-pColorWheel.y covx sys0,tTmp.txt,0,0 @@ -513,3 +513,29 @@ diff -bur HMI/n2t-out/popupLight.txt HMI/US/portrait/n2t-out/popupLight.txt //send calc crc btlen tSend.txt,sys0 crcrest 1,0xffff // reset CRC +diff -bur HMI/n2t-out/screensaver.txt HMI/US/portrait/n2t-out/screensaver.txt +--- HMI/n2t-out/screensaver.txt 2022-05-28 05:04:50.364986253 +0000 ++++ HMI/US/portrait/n2t-out/screensaver.txt 2022-05-28 05:04:50.784984016 +0000 +@@ -471,22 +471,6 @@ + vis tMainIconAlt,1 + vis tMRIcon,1 + vis tMR,1 +- vis tForecast1,0 +- vis tF1Icon,0 +- vis tForecast1Val,0 +- //move forecast values to the right +- tForecast4.txt=tForecast3.txt +- tForecast3.txt=tForecast2.txt +- tForecast2.txt=tForecast1.txt +- tForecast4Val.txt=tForecast3Val.txt +- tForecast3Val.txt=tForecast2Val.txt +- tForecast2Val.txt=tForecast1Val.txt +- tF4Icon.txt=tF3Icon.txt +- tF3Icon.txt=tF2Icon.txt +- tF2Icon.txt=tF1Icon.txt +- tF4Icon.pco=tF3Icon.pco +- tF3Icon.pco=tF2Icon.pco +- tF2Icon.pco=tF1Icon.pco + } + //tMR + spstr strCommand.txt,tMR.txt,"~",16 diff --git a/HMI/US/portrait/diff-filtered.txt b/HMI/US/portrait/diff-filtered.txt index e60771ec..60af0e80 100644 --- a/HMI/US/portrait/diff-filtered.txt +++ b/HMI/US/portrait/diff-filtered.txt @@ -1,15 +1,15 @@ -+++ HMI/US/portrait/diff-eu-version.txt 2022-05-27 20:18:09.413466958 +0000 -+--- HMI/n2t-out/Program.s.txt 2022-05-27 20:18:08.893442508 +0000 -++++ HMI/US/portrait/n2t-out/Program.s.txt 2022-05-27 20:18:09.393466017 +0000 -+--- HMI/n2t-out/cardEntities.txt 2022-05-27 20:18:08.893442508 +0000 -++++ HMI/US/portrait/n2t-out/cardEntities.txt 2022-05-27 20:18:09.397466205 +0000 -+--- HMI/n2t-out/cardQR.txt 2022-05-27 20:18:08.893442508 +0000 -++++ HMI/US/portrait/n2t-out/cardQR.txt 2022-05-27 20:18:09.397466205 +0000 -+--- HMI/n2t-out/pageStartup.txt 2022-05-27 20:18:08.893442508 +0000 -++++ HMI/US/portrait/n2t-out/pageStartup.txt 2022-05-27 20:18:09.397466205 +0000 ++++ HMI/US/portrait/diff-eu-version.txt 2022-05-28 05:04:50.800983931 +0000 ++--- HMI/n2t-out/Program.s.txt 2022-05-28 05:04:50.360986275 +0000 +++++ HMI/US/portrait/n2t-out/Program.s.txt 2022-05-28 05:04:50.784984016 +0000 ++--- HMI/n2t-out/cardEntities.txt 2022-05-28 05:04:50.364986253 +0000 +++++ HMI/US/portrait/n2t-out/cardEntities.txt 2022-05-28 05:04:50.784984016 +0000 ++--- HMI/n2t-out/cardQR.txt 2022-05-28 05:04:50.364986253 +0000 +++++ HMI/US/portrait/n2t-out/cardQR.txt 2022-05-28 05:04:50.784984016 +0000 ++--- HMI/n2t-out/pageStartup.txt 2022-05-28 05:04:50.364986253 +0000 +++++ HMI/US/portrait/n2t-out/pageStartup.txt 2022-05-28 05:04:50.784984016 +0000 +diff -bur HMI/n2t-out/popupLight.txt HMI/US/portrait/n2t-out/popupLight.txt -+--- HMI/n2t-out/popupLight.txt 2022-05-27 20:18:08.893442508 +0000 -++++ HMI/US/portrait/n2t-out/popupLight.txt 2022-05-27 20:18:09.397466205 +0000 ++--- HMI/n2t-out/popupLight.txt 2022-05-28 05:04:50.364986253 +0000 +++++ HMI/US/portrait/n2t-out/popupLight.txt 2022-05-28 05:04:50.784984016 +0000 +@@ -209,9 +209,6 @@ + sys0=sys0-pColorWheel.y + covx sys0,tTmp.txt,0,0 @@ -20,3 +20,6 @@ + //send calc crc + btlen tSend.txt,sys0 + crcrest 1,0xffff // reset CRC ++--- HMI/n2t-out/screensaver.txt 2022-05-28 05:04:50.364986253 +0000 +++++ HMI/US/portrait/n2t-out/screensaver.txt 2022-05-28 05:04:50.784984016 +0000 ++@@ -471,22 +471,6 @@ diff --git a/HMI/US/portrait/n2t-out-visual/nspanel_US_P_Stats.txt b/HMI/US/portrait/n2t-out-visual/nspanel_US_P_Stats.txt index c136fce0..00519624 100644 --- a/HMI/US/portrait/n2t-out-visual/nspanel_US_P_Stats.txt +++ b/HMI/US/portrait/n2t-out-visual/nspanel_US_P_Stats.txt @@ -38,10 +38,6 @@ cardMedia 33 Component(s) 350 Line(s) of event code 179 Unique line(s) of event code -screensaver - 37 Component(s) - 303 Line(s) of event code - 242 Unique line(s) of event code pageStartup 19 Component(s) 154 Line(s) of event code @@ -50,6 +46,10 @@ popupShutter 20 Component(s) 244 Line(s) of event code 138 Unique line(s) of event code +screensaver + 37 Component(s) + 290 Line(s) of event code + 229 Unique line(s) of event code cardEntities 77 Component(s) 1363 Line(s) of event code @@ -58,5 +58,5 @@ cardEntities Total 13 Page(s) 416 Component(s) - 4695 Line(s) of event code - 1244 Unique line(s) of event code + 4682 Line(s) of event code + 1231 Unique line(s) of event code diff --git a/HMI/US/portrait/n2t-out-visual/screensaver.txt b/HMI/US/portrait/n2t-out-visual/screensaver.txt index 6ef3abed..ed75a9df 100644 --- a/HMI/US/portrait/n2t-out-visual/screensaver.txt +++ b/HMI/US/portrait/n2t-out-visual/screensaver.txt @@ -1016,22 +1016,6 @@ Timer tmSerial vis tMainIconAlt,1 vis tMRIcon,1 vis tMR,1 - vis tForecast1,0 - vis tF1Icon,0 - vis tForecast1Val,0 - //move forecast values to the right - tForecast4.txt=tForecast3.txt - tForecast3.txt=tForecast2.txt - tForecast2.txt=tForecast1.txt - tForecast4Val.txt=tForecast3Val.txt - tForecast3Val.txt=tForecast2Val.txt - tForecast2Val.txt=tForecast1Val.txt - tF4Icon.txt=tF3Icon.txt - tF3Icon.txt=tF2Icon.txt - tF2Icon.txt=tF1Icon.txt - tF4Icon.pco=tF3Icon.pco - tF3Icon.pco=tF2Icon.pco - tF2Icon.pco=tF1Icon.pco } //tMR spstr strCommand.txt,tMR.txt,"~",16 @@ -1058,6 +1042,8 @@ Timer tmSerial tMRIcon.bco=tTime.bco tMR.bco=tTime.bco tMRIcon.bco=tTime.bco + tIcon1.bco=tTime.bco + tIcon2.bco=tTime.bco tForecast1.bco=tTime.bco tForecast1Val.bco=tTime.bco tF1Icon.bco=tTime.bco diff --git a/HMI/US/portrait/n2t-out/screensaver.txt b/HMI/US/portrait/n2t-out/screensaver.txt index 42a6eb9a..96c870e3 100644 --- a/HMI/US/portrait/n2t-out/screensaver.txt +++ b/HMI/US/portrait/n2t-out/screensaver.txt @@ -471,22 +471,6 @@ Timer tmSerial vis tMainIconAlt,1 vis tMRIcon,1 vis tMR,1 - vis tForecast1,0 - vis tF1Icon,0 - vis tForecast1Val,0 - //move forecast values to the right - tForecast4.txt=tForecast3.txt - tForecast3.txt=tForecast2.txt - tForecast2.txt=tForecast1.txt - tForecast4Val.txt=tForecast3Val.txt - tForecast3Val.txt=tForecast2Val.txt - tForecast2Val.txt=tForecast1Val.txt - tF4Icon.txt=tF3Icon.txt - tF3Icon.txt=tF2Icon.txt - tF2Icon.txt=tF1Icon.txt - tF4Icon.pco=tF3Icon.pco - tF3Icon.pco=tF2Icon.pco - tF2Icon.pco=tF1Icon.pco } //tMR spstr strCommand.txt,tMR.txt,"~",16 @@ -513,6 +497,8 @@ Timer tmSerial tMRIcon.bco=tTime.bco tMR.bco=tTime.bco tMRIcon.bco=tTime.bco + tIcon1.bco=tTime.bco + tIcon2.bco=tTime.bco tForecast1.bco=tTime.bco tForecast1Val.bco=tTime.bco tF1Icon.bco=tTime.bco diff --git a/HMI/n2t-out-visual/nspanel_Stats.txt b/HMI/n2t-out-visual/nspanel_Stats.txt index 3873cf4a..bf2c289b 100644 --- a/HMI/n2t-out-visual/nspanel_Stats.txt +++ b/HMI/n2t-out-visual/nspanel_Stats.txt @@ -28,8 +28,8 @@ popupLight 188 Unique line(s) of event code screensaver 37 Component(s) - 303 Line(s) of event code - 242 Unique line(s) of event code + 305 Line(s) of event code + 244 Unique line(s) of event code cardQR 30 Component(s) 363 Line(s) of event code @@ -58,5 +58,5 @@ cardEntities Total 13 Page(s) 404 Component(s) - 4469 Line(s) of event code - 1174 Unique line(s) of event code + 4471 Line(s) of event code + 1176 Unique line(s) of event code diff --git a/HMI/n2t-out-visual/screensaver.txt b/HMI/n2t-out-visual/screensaver.txt index 5e731448..e6cb1130 100644 --- a/HMI/n2t-out-visual/screensaver.txt +++ b/HMI/n2t-out-visual/screensaver.txt @@ -1058,6 +1058,8 @@ Timer tmSerial tMRIcon.bco=tTime.bco tMR.bco=tTime.bco tMRIcon.bco=tTime.bco + tIcon1.bco=tTime.bco + tIcon2.bco=tTime.bco tForecast1.bco=tTime.bco tForecast1Val.bco=tTime.bco tF1Icon.bco=tTime.bco diff --git a/HMI/n2t-out/screensaver.txt b/HMI/n2t-out/screensaver.txt index 42a6eb9a..bd952279 100644 --- a/HMI/n2t-out/screensaver.txt +++ b/HMI/n2t-out/screensaver.txt @@ -513,6 +513,8 @@ Timer tmSerial tMRIcon.bco=tTime.bco tMR.bco=tTime.bco tMRIcon.bco=tTime.bco + tIcon1.bco=tTime.bco + tIcon2.bco=tTime.bco tForecast1.bco=tTime.bco tForecast1Val.bco=tTime.bco tF1Icon.bco=tTime.bco From f1f506da004d46c74166189abf27b8f04976cba5 Mon Sep 17 00:00:00 2001 From: joBr99 <29555657+joBr99@users.noreply.github.com> Date: Sat, 28 May 2022 07:09:25 +0200 Subject: [PATCH 2/2] Update pages.py --- apps/nspanel-lovelace-ui/luibackend/pages.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/nspanel-lovelace-ui/luibackend/pages.py b/apps/nspanel-lovelace-ui/luibackend/pages.py index c77eae83..ed4f8954 100644 --- a/apps/nspanel-lovelace-ui/luibackend/pages.py +++ b/apps/nspanel-lovelace-ui/luibackend/pages.py @@ -277,7 +277,7 @@ class LuiPagesGen(object): command = f"entityUpd~Not found~{navigation}~{item}~check~220~apps.yaml~150~300~5~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~Please~your~~" else: entity = self._ha_api.get_entity(item) - heading = title if title == "unknown" else entity.attributes.friendly_name + heading = title if title != "unknown" else entity.attributes.friendly_name current_temp = get_attr_safe(entity, "current_temperature", "") dest_temp = int(get_attr_safe(entity, "temperature", 0)*10) status = get_attr_safe(entity, "hvac_action", "") @@ -330,7 +330,7 @@ class LuiPagesGen(object): command = f"entityUpd~Not found~{navigation}~{item}~{get_icon_id('alert-circle-outline')}~Please check your~apps.yaml in AppDaemon~~0~{get_icon_id('alert-circle-outline')}~~~disable" else: entity = self._ha_api.get_entity(item) - heading = title if title == "unknown" else entity.attributes.friendly_name + heading = title if title != "unknown" else entity.attributes.friendly_name icon = get_icon_id('speaker-off') title = get_attr_safe(entity, "media_title", "") author = get_attr_safe(entity, "media_artist", "")