From 75d652e402c89a301160c99d3e011f44eea3b4af Mon Sep 17 00:00:00 2001 From: joBr99 Date: Fri, 23 Jun 2023 18:14:55 +0000 Subject: [PATCH 1/6] Merge branch 'main' of github.com:joBr99/nspanel-lovelace-ui (add nextion2text) --- HMI/US/landscape/diff-eu-version.txt | 19 +++++++++++++++ HMI/US/portrait/diff-eu-version.txt | 19 +++++++++++++++ HMI/US/portrait/diff-filtered.txt | 35 +++++++++++++++++++++------- HMI/n2t-out-visual/nspanel_Stats.txt | 10 ++++---- HMI/n2t-out-visual/screensaver2.txt | 4 ++++ HMI/n2t-out/screensaver2.txt | 4 ++++ 6 files changed, 78 insertions(+), 13 deletions(-) diff --git a/HMI/US/landscape/diff-eu-version.txt b/HMI/US/landscape/diff-eu-version.txt index 03337f12..55a1274d 100644 --- a/HMI/US/landscape/diff-eu-version.txt +++ b/HMI/US/landscape/diff-eu-version.txt @@ -268,3 +268,22 @@ │ if(tAMPM.txt=="") │ { │ vis tAMPM,0 +│ @@ -824,18 +800,14 @@ +│ { +│ page cardPower +│ } +│ if(tId.txt=="cardChart") +│ { +│ page cardChart +│ } +│ - if(tId.txt=="cardLChart") +│ - { +│ - page cardLChart +│ - } +│ } +│ if(tInstruction.txt=="timeout") +│ { +│ //set timeout to global var +│ spstr strCommand.txt,tTmp.txt,"~",1 +│ covx tTmp.txt,sleepTimeout,0,0 +│ } diff --git a/HMI/US/portrait/diff-eu-version.txt b/HMI/US/portrait/diff-eu-version.txt index 5c337b29..5af43d85 100644 --- a/HMI/US/portrait/diff-eu-version.txt +++ b/HMI/US/portrait/diff-eu-version.txt @@ -1842,3 +1842,22 @@ │ if(tAMPM.txt=="") │ { │ vis tAMPM,0 +│ @@ -824,18 +800,14 @@ +│ { +│ page cardPower +│ } +│ if(tId.txt=="cardChart") +│ { +│ page cardChart +│ } +│ - if(tId.txt=="cardLChart") +│ - { +│ - page cardLChart +│ - } +│ } +│ if(tInstruction.txt=="timeout") +│ { +│ //set timeout to global var +│ spstr strCommand.txt,tTmp.txt,"~",1 +│ covx tTmp.txt,sleepTimeout,0,0 +│ } diff --git a/HMI/US/portrait/diff-filtered.txt b/HMI/US/portrait/diff-filtered.txt index ebb8a9ec..3c380e18 100644 --- a/HMI/US/portrait/diff-filtered.txt +++ b/HMI/US/portrait/diff-filtered.txt @@ -1,4 +1,4 @@ -+++ /dev/fd/62 2023-06-01 14:52:47.691403479 +0000 ++++ /dev/fd/62 2023-06-23 18:14:46.258673287 +0000 +I/n2t-out/Program.s.txt ++ HMI/US/portrait/n2t-out/Program.s.txt +1 +10,11 @@ @@ -586,13 +586,6 @@ + covx tTmp.txt,sys0,0,0 + hSlider6.maxval=sys0 + } -+ } -+ if(tInstruction.txt=="pageType") -+ { -+ sleepValue=0 -+ //command format pageType,specialPageName -+ //write name of speical page to tId -+ spstr strCommand.txt,tId.txt,"~",1 +I/n2t-out/cardGrid2.txt ++ HMI/US/portrait/n2t-out/cardGrid2.txt +6 +25,28 @@ @@ -850,6 +843,13 @@ + spstr strCommand.txt,tEntity9.txt,"~",66 + vis tEntity9,1 + } ++ } ++ if(tInstruction.txt=="pageType") ++ { ++ sleepValue=0 ++ //command format pageType,specialPageName ++ //write name of speical page to tId ++ spstr strCommand.txt,tId.txt,"~",1 +I/n2t-out/cardPower.txt ++ HMI/US/portrait/n2t-out/cardPower.txt +6 +45,16 @@ @@ -1380,3 +1380,22 @@ + if(tAMPM.txt=="") + { + vis tAMPM,0 ++18 +800,14 @@ ++ { ++ page cardPower ++ } ++ if(tId.txt=="cardChart") ++ { ++ page cardChart ++ } ++ if(tId.txt=="cardLChart") ++ { ++ page cardLChart ++ } ++ } ++ if(tInstruction.txt=="timeout") ++ { ++ //set timeout to global var ++ spstr strCommand.txt,tTmp.txt,"~",1 ++ covx tTmp.txt,sleepTimeout,0,0 ++ } diff --git a/HMI/n2t-out-visual/nspanel_Stats.txt b/HMI/n2t-out-visual/nspanel_Stats.txt index f6315820..d099e6e6 100644 --- a/HMI/n2t-out-visual/nspanel_Stats.txt +++ b/HMI/n2t-out-visual/nspanel_Stats.txt @@ -50,6 +50,10 @@ cardChart 33 Component(s) 437 Line(s) of event code 296 Unique line(s) of event code +screensaver2 + 59 Component(s) + 362 Line(s) of event code + 255 Unique line(s) of event code cardAlarm 43 Component(s) 500 Line(s) of event code @@ -62,10 +66,6 @@ cardThermo 57 Component(s) 540 Line(s) of event code 319 Unique line(s) of event code -screensaver2 - 59 Component(s) - 358 Line(s) of event code - 253 Unique line(s) of event code cardMedia 59 Component(s) 649 Line(s) of event code @@ -94,5 +94,5 @@ cardEntities Total 22 Page(s) 850 Component(s) - 9944 Line(s) of event code + 9948 Line(s) of event code 2385 Unique line(s) of event code diff --git a/HMI/n2t-out-visual/screensaver2.txt b/HMI/n2t-out-visual/screensaver2.txt index 15978e51..3d825e69 100644 --- a/HMI/n2t-out-visual/screensaver2.txt +++ b/HMI/n2t-out-visual/screensaver2.txt @@ -1661,6 +1661,10 @@ Timer tmSerial { page cardChart } + if(tId.txt=="cardLChart") + { + page cardLChart + } } if(tInstruction.txt=="timeout") { diff --git a/HMI/n2t-out/screensaver2.txt b/HMI/n2t-out/screensaver2.txt index 9f5f5323..e902af87 100644 --- a/HMI/n2t-out/screensaver2.txt +++ b/HMI/n2t-out/screensaver2.txt @@ -828,6 +828,10 @@ Timer tmSerial { page cardChart } + if(tId.txt=="cardLChart") + { + page cardLChart + } } if(tInstruction.txt=="timeout") { From 06174d39129652f66a5638c660f3b85b65767779 Mon Sep 17 00:00:00 2001 From: Marek <30291176+marek-vrana@users.noreply.github.com> Date: Fri, 21 Jul 2023 21:42:57 +0200 Subject: [PATCH 2/6] added ui card button translation #937 (#938) Co-authored-by: Marek Vrana --- .../luibackend/translations/frontend/sk.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/apps/nspanel-lovelace-ui/luibackend/translations/frontend/sk.json b/apps/nspanel-lovelace-ui/luibackend/translations/frontend/sk.json index 01480ce9..a603de7b 100644 --- a/apps/nspanel-lovelace-ui/luibackend/translations/frontend/sk.json +++ b/apps/nspanel-lovelace-ui/luibackend/translations/frontend/sk.json @@ -516,6 +516,9 @@ "last_triggered": "Naposledy spustené", "trigger": "Spustiť akcie" }, + "button": { + "press": "stlač" + }, "camera": { "not_available": "Obrázok nie je k dispozícii" }, From 8850e1d8cbaeab36cdb6b8670db6b93dd23f329a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20=C4=8Cerm=C3=A1k?= Date: Mon, 24 Jul 2023 21:43:02 +0200 Subject: [PATCH 3/6] fix cover tilt setting in AppDaemon backend (#939) --- apps/nspanel-lovelace-ui/luibackend/controller.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/nspanel-lovelace-ui/luibackend/controller.py b/apps/nspanel-lovelace-ui/luibackend/controller.py index 78691a25..ab0b78f8 100644 --- a/apps/nspanel-lovelace-ui/luibackend/controller.py +++ b/apps/nspanel-lovelace-ui/luibackend/controller.py @@ -275,7 +275,7 @@ class LuiController(object): apis.ha_api.get_entity(entity_id).call_service("close_cover_tilt") if button_type == "tiltSlider": pos = int(value) - apis.ha_api.get_entity(entity_id).call_service("set_cover_tilt_position", position=pos) + apis.ha_api.get_entity(entity_id).call_service("set_cover_tilt_position", tilt_position=pos) if button_type == "button": From 26cce9ac130d1cfe352847240a8e1ecaccb3984a Mon Sep 17 00:00:00 2001 From: fre4242 Date: Sun, 30 Jul 2023 20:09:26 +0200 Subject: [PATCH 4/6] Improved screensaverAdvanced icon handling: option to load from iobroker object --- ioBroker/NsPanelTs.ts | 18 +++++++++++++++--- ioBroker/NsPanelTs_without_Examples.ts | 18 +++++++++++++++--- 2 files changed, 30 insertions(+), 6 deletions(-) diff --git a/ioBroker/NsPanelTs.ts b/ioBroker/NsPanelTs.ts index fe7e4128..34d96135 100644 --- a/ioBroker/NsPanelTs.ts +++ b/ioBroker/NsPanelTs.ts @@ -6987,7 +6987,13 @@ function HandleScreensaverUpdate(): void { let val = getState(config.leftScreensaverEntity[i].ScreensaverEntity).val; let iconColor = rgb_dec565(White); - let icon = Icons.GetIcon(config.leftScreensaverEntity[i].ScreensaverEntityIconOn); + let icon; + if (existsObject(config.leftScreensaverEntity[i].ScreensaverEntityIconOn)) { + let iconName = getState(config.leftScreensaverEntity[i].ScreensaverEntityIconOn).val; + icon = Icons.GetIcon(iconName); + } else { + icon = Icons.GetIcon(config.leftScreensaverEntity[i].ScreensaverEntityIconOn); + } if (typeof(val) == 'number') { val = (val * config.leftScreensaverEntity[i].ScreensaverEntityFactor).toFixed(config.leftScreensaverEntity[i].ScreensaverEntityDecimalPlaces) + config.leftScreensaverEntity[i].ScreensaverEntityUnitText; @@ -7164,7 +7170,13 @@ function HandleScreensaverUpdate(): void { let val = getState(config.bottomScreensaverEntity[i].ScreensaverEntity).val; let iconColor = rgb_dec565(White); - let icon = Icons.GetIcon(config.bottomScreensaverEntity[i].ScreensaverEntityIconOn); + let icon; + if (existsObject(config.bottomScreensaverEntity[i].ScreensaverEntityIconOn)) { + let iconName = getState(config.bottomScreensaverEntity[i].ScreensaverEntityIconOn).val; + icon = Icons.GetIcon(iconName); + } else { + icon = Icons.GetIcon(config.bottomScreensaverEntity[i].ScreensaverEntityIconOn); + } if (typeof(val) == 'number') { val = (val * config.bottomScreensaverEntity[i].ScreensaverEntityFactor).toFixed(config.bottomScreensaverEntity[i].ScreensaverEntityDecimalPlaces) + config.bottomScreensaverEntity[i].ScreensaverEntityUnitText; @@ -7215,7 +7227,7 @@ function HandleScreensaverUpdate(): void { let val = getState(config.indicatorScreensaverEntity[i].ScreensaverEntity).val; let iconColor = rgb_dec565(White); - let icon = null; + let icon; if (existsObject(config.indicatorScreensaverEntity[i].ScreensaverEntityIconOn)) { let iconName = getState(config.indicatorScreensaverEntity[i].ScreensaverEntityIconOn).val; icon = Icons.GetIcon(iconName); diff --git a/ioBroker/NsPanelTs_without_Examples.ts b/ioBroker/NsPanelTs_without_Examples.ts index fd894a5e..a54a8459 100644 --- a/ioBroker/NsPanelTs_without_Examples.ts +++ b/ioBroker/NsPanelTs_without_Examples.ts @@ -6488,7 +6488,13 @@ function HandleScreensaverUpdate(): void { let val = getState(config.leftScreensaverEntity[i].ScreensaverEntity).val; let iconColor = rgb_dec565(White); - let icon = Icons.GetIcon(config.leftScreensaverEntity[i].ScreensaverEntityIconOn); + let icon; + if (existsObject(config.leftScreensaverEntity[i].ScreensaverEntityIconOn)) { + let iconName = getState(config.leftScreensaverEntity[i].ScreensaverEntityIconOn).val; + icon = Icons.GetIcon(iconName); + } else { + icon = Icons.GetIcon(config.leftScreensaverEntity[i].ScreensaverEntityIconOn); + } if (typeof(val) == 'number') { val = (val * config.leftScreensaverEntity[i].ScreensaverEntityFactor).toFixed(config.leftScreensaverEntity[i].ScreensaverEntityDecimalPlaces) + config.leftScreensaverEntity[i].ScreensaverEntityUnitText; @@ -6665,7 +6671,13 @@ function HandleScreensaverUpdate(): void { let val = getState(config.bottomScreensaverEntity[i].ScreensaverEntity).val; let iconColor = rgb_dec565(White); - let icon = Icons.GetIcon(config.bottomScreensaverEntity[i].ScreensaverEntityIconOn); + let icon; + if (existsObject(config.bottomScreensaverEntity[i].ScreensaverEntityIconOn)) { + let iconName = getState(config.bottomScreensaverEntity[i].ScreensaverEntityIconOn).val; + icon = Icons.GetIcon(iconName); + } else { + icon = Icons.GetIcon(config.bottomScreensaverEntity[i].ScreensaverEntityIconOn); + } if (typeof(val) == 'number') { val = (val * config.bottomScreensaverEntity[i].ScreensaverEntityFactor).toFixed(config.bottomScreensaverEntity[i].ScreensaverEntityDecimalPlaces) + config.bottomScreensaverEntity[i].ScreensaverEntityUnitText; @@ -6716,7 +6728,7 @@ function HandleScreensaverUpdate(): void { let val = getState(config.indicatorScreensaverEntity[i].ScreensaverEntity).val; let iconColor = rgb_dec565(White); - let icon = null; + let icon; if (existsObject(config.indicatorScreensaverEntity[i].ScreensaverEntityIconOn)) { let iconName = getState(config.indicatorScreensaverEntity[i].ScreensaverEntityIconOn).val; icon = Icons.GetIcon(iconName); From ec15e5672835f9da4d63c6b7dcbbcb8dbcf06c97 Mon Sep 17 00:00:00 2001 From: Armilar <102996011+Armilar@users.noreply.github.com> Date: Sun, 30 Jul 2023 21:59:01 +0200 Subject: [PATCH 5/6] Update NsPanelTs.ts v4.0.5.15 - Improved screensaverAdvanced icon handling: option to load from iobroker object #944 --- ioBroker/NsPanelTs.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ioBroker/NsPanelTs.ts b/ioBroker/NsPanelTs.ts index 34d96135..b430aafe 100644 --- a/ioBroker/NsPanelTs.ts +++ b/ioBroker/NsPanelTs.ts @@ -1,5 +1,5 @@ /*----------------------------------------------------------------------- -TypeScript v4.0.5.14 zur Steuerung des SONOFF NSPanel mit dem ioBroker by @Armilar / @Sternmiere / @Britzelpuf / @ravenS0ne / @TT-Tom +TypeScript v4.0.5.15 zur Steuerung des SONOFF NSPanel mit dem ioBroker by @Armilar / @Sternmiere / @Britzelpuf / @ravenS0ne / @TT-Tom - abgestimmt auf TFT 50 / v4.0.5 / BerryDriver 8 / Tasmota 12.5.0 @joBr99 Projekt: https://github.com/joBr99/nspanel-lovelace-ui/tree/main/ioBroker NsPanelTs.ts (dieses TypeScript in ioBroker) Stable: https://github.com/joBr99/nspanel-lovelace-ui/blob/main/ioBroker/NsPanelTs.ts @@ -138,6 +138,7 @@ ReleaseNotes: - 02.05.2023 - v4.0.5.12 Add new Function Debug mode from script activatable via panel - 02.05.2023 - v4.0.5.13 Fix Problems with weather-instances-number !="0" #876 - 02.05.2023 - v4.0.5.14 Fix: Remove empty log statements #883 + - 30.07.2023 - v4.0.5.15 Improved screensaverAdvanced icon handling: option to load from iobroker object #944 *********************************************************************************************************** * Für die Erstellung der Aliase durch das Skript, muss in der JavaScript Instanz "setObect" gesetzt sein! * From 2aa1e222aa3df90458a862310e815eb93e8beec1 Mon Sep 17 00:00:00 2001 From: Armilar <102996011+Armilar@users.noreply.github.com> Date: Sun, 30 Jul 2023 21:59:51 +0200 Subject: [PATCH 6/6] Update NsPanelTs_without_Examples.ts v4.0.5.15 - Improved screensaverAdvanced icon handling: option to load from iobroker object #944 --- ioBroker/NsPanelTs_without_Examples.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ioBroker/NsPanelTs_without_Examples.ts b/ioBroker/NsPanelTs_without_Examples.ts index a54a8459..0508ccf9 100644 --- a/ioBroker/NsPanelTs_without_Examples.ts +++ b/ioBroker/NsPanelTs_without_Examples.ts @@ -1,5 +1,5 @@ /*----------------------------------------------------------------------- -TypeScript v4.0.5.14 zur Steuerung des SONOFF NSPanel mit dem ioBroker by @Armilar / @Sternmiere / @Britzelpuf / @ravenS0ne / @TT-Tom +TypeScript v4.0.5.15 zur Steuerung des SONOFF NSPanel mit dem ioBroker by @Armilar / @Sternmiere / @Britzelpuf / @ravenS0ne / @TT-Tom - abgestimmt auf TFT 50 / v4.0.5 / BerryDriver 8 / Tasmota 12.5.0 @joBr99 Projekt: https://github.com/joBr99/nspanel-lovelace-ui/tree/main/ioBroker NsPanelTs.ts (dieses TypeScript in ioBroker) Stable: https://github.com/joBr99/nspanel-lovelace-ui/blob/main/ioBroker/NsPanelTs.ts @@ -138,7 +138,8 @@ ReleaseNotes: - 02.05.2023 - v4.0.5.12 Add new Function Debug mode from script activatable via panel - 02.05.2023 - v4.0.5.13 Fix Problems with weather-instances-number !="0" #876 - 02.05.2023 - v4.0.5.14 Fix: Remove empty log statements (PR #883) - + - 30.07.2023 - v4.0.5.15 Improved screensaverAdvanced icon handling: option to load from iobroker object #944 + *********************************************************************************************************** * Für die Erstellung der Aliase durch das Skript, muss in der JavaScript Instanz "setObect" gesetzt sein! * ***********************************************************************************************************