diff --git a/.github/ISSUE_TEMPLATE/feature-request.md b/.github/ISSUE_TEMPLATE/feature-request.md index 835831f8..47fbdc40 100644 --- a/.github/ISSUE_TEMPLATE/feature-request.md +++ b/.github/ISSUE_TEMPLATE/feature-request.md @@ -9,7 +9,7 @@ assignees: '' ### FEATURE DESCRIPTION -_A clear and concise description of what the problem is._ - +_A clear and concise description of what the feature should do._ ### ADDITIONAL CONTEXT _Add any other context about the problem here._ diff --git a/.github/issue-close-app.yml b/.github/issue-close-app.yml index 0ada963a..0ca36c87 100644 --- a/.github/issue-close-app.yml +++ b/.github/issue-close-app.yml @@ -5,26 +5,20 @@ # Comment that will be sent if an issue is judged to be closed. comment: >- - This issue has been automatically closed because the PROBLEM REPORT TEMPLATE is missing or incomplete. + This issue has been automatically closed because the TEMPLATE is missing or incomplete. Filling the template is required so standard questions don't need to be asked again each time. - Our ability to provide assistance is greatly hampered if few minutes are not taken to complete the issue template + THe ability to provide assistance is greatly hampered if few minutes are not taken to complete the issue template with the requested information. The details requested potentially affect which options to pursue. The small amount of time you will spend completing the template will also help the volunteers, providing assistance to you, to reduce the time required to help you. - Please, could you be so kind on completing the [PROBLEM REPORT TEMPLATE](https://github.com/arendst/Tasmota/issues/new/choose) in order to have more information so as to properly help you? + Please, could you be so kind on completing the [REPORT TEMPLATE](https://github.com/joBr99/nspanel-lovelace-ui/issues/new/choose) in order to have more information so as to properly help you? Thank you for taking the time to report, hopefully it can be resolved soon. - [Docs](https://tasmota.github.io/docs/) for more information. + [Docs](https://docs.nspanel.pky.eu) for more information. - [Discussions](https://github.com/arendst/Tasmota/discussions) for Questions, Feature Requests and Projects. - - [Chat](https://discord.gg/Ks2Kzd4) for more users experience. - - Please check the [Code of Conduct](https://github.com/arendst/Tasmota/blob/development/CODE_OF_CONDUCT.md) and the [Contributing Guideline and Policy](https://github.com/arendst/Tasmota/blob/development/CONTRIBUTING.md) - issueConfigs: # There can be several configs for different kind of issues. - content: @@ -48,4 +42,7 @@ caseInsensitive: true # The bot will only add a label if this property is set. label: "template missing/incomplete" # The issue is judged to be legal if it includes all keywords from any of these two configs. -# Or it will be closed by the app. \ No newline at end of file +# Or it will be closed by the app. +exception: + - "joBr99" + - "Armilar" diff --git a/HMI/US/landscape/diff-eu-version.txt b/HMI/US/landscape/diff-eu-version.txt index 60c2cf77..ae4ab873 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-06-19 14:20:59.947205019 +0000 -+++ HMI/US/landscape/n2t-out/Program.s.txt 2022-06-19 14:21:01.123214844 +0000 +--- HMI/n2t-out/Program.s.txt 2022-06-19 15:03:27.316416932 +0000 ++++ HMI/US/landscape/n2t-out/Program.s.txt 2022-06-19 15:03:28.220436240 +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/pageStartup.txt HMI/US/landscape/n2t-out/pageStartup.txt ---- HMI/n2t-out/pageStartup.txt 2022-06-19 14:20:59.947205019 +0000 -+++ HMI/US/landscape/n2t-out/pageStartup.txt 2022-06-19 14:21:01.123214844 +0000 +--- HMI/n2t-out/pageStartup.txt 2022-06-19 15:03:27.316416932 +0000 ++++ HMI/US/landscape/n2t-out/pageStartup.txt 2022-06-19 15:03:28.220436240 +0000 @@ -177,7 +177,7 @@ recmod=1 bauds=115200 @@ -21,8 +21,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/popupShutter.txt HMI/US/landscape/n2t-out/popupShutter.txt ---- HMI/n2t-out/popupShutter.txt 2022-06-19 14:20:59.947205019 +0000 -+++ HMI/US/landscape/n2t-out/popupShutter.txt 2022-06-19 14:21:01.123214844 +0000 +--- HMI/n2t-out/popupShutter.txt 2022-06-19 15:03:27.316416932 +0000 ++++ HMI/US/landscape/n2t-out/popupShutter.txt 2022-06-19 15:03:28.220436240 +0000 @@ -181,7 +181,7 @@ Touch Release Event // event,buttonPress2,internalNameEntity,positionSlider,50 @@ -59,7 +59,13 @@ diff -bur HMI/n2t-out/popupShutter.txt HMI/US/landscape/n2t-out/popupShutter.txt //send calc crc btlen tSend.txt,sys0 crcrest 1,0xffff // reset CRC -@@ -520,7 +520,6 @@ +@@ -515,13 +515,11 @@ + tsw bTLeft,0 + spstr strCommand.txt,bTLeft.txt,"~",13 + bTLeft.pco=27501 +- vis bTRight,1 + }else if(tTmp.txt=="enable") + { spstr strCommand.txt,bTLeft.txt,"~",13 tsw bTLeft,1 bTLeft.pco=65535 @@ -67,7 +73,13 @@ diff -bur HMI/n2t-out/popupShutter.txt HMI/US/landscape/n2t-out/popupShutter.txt } // set icon bStop spstr strCommand.txt,tTmp.txt,"~",17 -@@ -534,10 +533,9 @@ +@@ -530,36 +528,24 @@ + tsw bTStop,0 + spstr strCommand.txt,bTStop.txt,"~",14 + bTStop.pco=27501 +- vis bTRight,1 + }else if(tTmp.txt=="enable") + { spstr strCommand.txt,bTStop.txt,"~",14 tsw bTStop,1 bTStop.pco=65535 @@ -79,7 +91,11 @@ diff -bur HMI/n2t-out/popupShutter.txt HMI/US/landscape/n2t-out/popupShutter.txt if(tTmp.txt=="disable") { spstr strCommand.txt,bTRight.txt,"~",15 -@@ -548,15 +546,6 @@ + tsw bTRight,0 + bTRight.pco=27501 +- vis bTRight,1 + }else if(tTmp.txt=="enable") + { spstr strCommand.txt,bTRight.txt,"~",15 tsw bTRight,1 bTRight.pco=65535 diff --git a/HMI/US/portrait/diff-eu-version.txt b/HMI/US/portrait/diff-eu-version.txt index 4a897f0a..1ee6df48 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-06-19 14:20:59.947205019 +0000 -+++ HMI/US/portrait/n2t-out/Program.s.txt 2022-06-19 14:21:00.515209751 +0000 +--- HMI/n2t-out/Program.s.txt 2022-06-19 15:03:27.316416932 +0000 ++++ HMI/US/portrait/n2t-out/Program.s.txt 2022-06-19 15:03:27.756426330 +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-06-19 14:20:59.951205050 +0000 -+++ HMI/US/portrait/n2t-out/cardEntities.txt 2022-06-19 14:21:00.515209751 +0000 +--- HMI/n2t-out/cardEntities.txt 2022-06-19 15:03:27.316416932 +0000 ++++ HMI/US/portrait/n2t-out/cardEntities.txt 2022-06-19 15:03:27.756426330 +0000 @@ -63,6 +63,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/pageStartup.txt HMI/US/portrait/n2t-out/pageStartup.txt ---- HMI/n2t-out/pageStartup.txt 2022-06-19 14:20:59.947205019 +0000 -+++ HMI/US/portrait/n2t-out/pageStartup.txt 2022-06-19 14:21:00.515209751 +0000 +--- HMI/n2t-out/pageStartup.txt 2022-06-19 15:03:27.316416932 +0000 ++++ HMI/US/portrait/n2t-out/pageStartup.txt 2022-06-19 15:03:27.756426330 +0000 @@ -142,7 +142,7 @@ Disable release event after dragging: 0 Send Component ID : disabled @@ -488,30 +488,9 @@ diff -bur HMI/n2t-out/pageStartup.txt HMI/US/portrait/n2t-out/pageStartup.txt //send calc crc 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-06-19 14:20:59.951205050 +0000 -+++ HMI/US/portrait/n2t-out/popupLight.txt 2022-06-19 14:21:00.515209751 +0000 -@@ -151,7 +151,7 @@ - Send Component ID : disabled - Associated Keyboard : none - Text : -- Max. Text Size : 80 -+ Max. Text Size : 10 - - Text tInstruction - Attributes diff -bur HMI/n2t-out/popupShutter.txt HMI/US/portrait/n2t-out/popupShutter.txt ---- HMI/n2t-out/popupShutter.txt 2022-06-19 14:20:59.947205019 +0000 -+++ HMI/US/portrait/n2t-out/popupShutter.txt 2022-06-19 14:21:00.515209751 +0000 -@@ -69,7 +69,7 @@ - Attributes - Scope : local - Text : -- Max. Text Size: 80 -+ Max. Text Size: 10 - - Text tEntity - Attributes +--- HMI/n2t-out/popupShutter.txt 2022-06-19 15:03:27.316416932 +0000 ++++ HMI/US/portrait/n2t-out/popupShutter.txt 2022-06-19 15:03:27.756426330 +0000 @@ -181,7 +181,7 @@ Touch Release Event // event,buttonPress2,internalNameEntity,positionSlider,50 @@ -548,7 +527,13 @@ diff -bur HMI/n2t-out/popupShutter.txt HMI/US/portrait/n2t-out/popupShutter.txt //send calc crc btlen tSend.txt,sys0 crcrest 1,0xffff // reset CRC -@@ -520,7 +520,6 @@ +@@ -515,13 +515,11 @@ + tsw bTLeft,0 + spstr strCommand.txt,bTLeft.txt,"~",13 + bTLeft.pco=27501 +- vis bTRight,1 + }else if(tTmp.txt=="enable") + { spstr strCommand.txt,bTLeft.txt,"~",13 tsw bTLeft,1 bTLeft.pco=65535 @@ -556,7 +541,13 @@ diff -bur HMI/n2t-out/popupShutter.txt HMI/US/portrait/n2t-out/popupShutter.txt } // set icon bStop spstr strCommand.txt,tTmp.txt,"~",17 -@@ -534,10 +533,9 @@ +@@ -530,36 +528,24 @@ + tsw bTStop,0 + spstr strCommand.txt,bTStop.txt,"~",14 + bTStop.pco=27501 +- vis bTRight,1 + }else if(tTmp.txt=="enable") + { spstr strCommand.txt,bTStop.txt,"~",14 tsw bTStop,1 bTStop.pco=65535 @@ -568,7 +559,11 @@ diff -bur HMI/n2t-out/popupShutter.txt HMI/US/portrait/n2t-out/popupShutter.txt if(tTmp.txt=="disable") { spstr strCommand.txt,bTRight.txt,"~",15 -@@ -548,15 +546,6 @@ + tsw bTRight,0 + bTRight.pco=27501 +- vis bTRight,1 + }else if(tTmp.txt=="enable") + { spstr strCommand.txt,bTRight.txt,"~",15 tsw bTRight,1 bTRight.pco=65535 diff --git a/HMI/US/portrait/diff-filtered.txt b/HMI/US/portrait/diff-filtered.txt index 31bec3d6..dd05ffd4 100644 --- a/HMI/US/portrait/diff-filtered.txt +++ b/HMI/US/portrait/diff-filtered.txt @@ -1,8 +1,8 @@ -+++ HMI/US/portrait/diff-eu-version.txt 2022-06-19 14:21:00.535209919 +0000 -+--- HMI/n2t-out/Program.s.txt 2022-06-19 14:20:59.947205019 +0000 -++++ HMI/US/portrait/n2t-out/Program.s.txt 2022-06-19 14:21:00.515209751 +0000 -+--- HMI/n2t-out/cardEntities.txt 2022-06-19 14:20:59.951205050 +0000 -++++ HMI/US/portrait/n2t-out/cardEntities.txt 2022-06-19 14:21:00.515209751 +0000 ++++ HMI/US/portrait/diff-eu-version.txt 2022-06-19 15:03:27.772426671 +0000 ++--- HMI/n2t-out/Program.s.txt 2022-06-19 15:03:27.316416932 +0000 +++++ HMI/US/portrait/n2t-out/Program.s.txt 2022-06-19 15:03:27.756426330 +0000 ++--- HMI/n2t-out/cardEntities.txt 2022-06-19 15:03:27.316416932 +0000 +++++ HMI/US/portrait/n2t-out/cardEntities.txt 2022-06-19 15:03:27.756426330 +0000 +@@ -63,6 +63,16 @@ +@@ -120,6 +130,18 @@ +@@ -156,6 +178,15 @@ @@ -14,32 +14,11 @@ +@@ -970,6 +1149,33 @@ +@@ -1075,6 +1281,28 @@ +@@ -1850,6 +2078,169 @@ -+--- HMI/n2t-out/pageStartup.txt 2022-06-19 14:20:59.947205019 +0000 -++++ HMI/US/portrait/n2t-out/pageStartup.txt 2022-06-19 14:21:00.515209751 +0000 -+diff -bur HMI/n2t-out/popupLight.txt HMI/US/portrait/n2t-out/popupLight.txt -+--- HMI/n2t-out/popupLight.txt 2022-06-19 14:20:59.951205050 +0000 -++++ HMI/US/portrait/n2t-out/popupLight.txt 2022-06-19 14:21:00.515209751 +0000 -+@@ -151,7 +151,7 @@ -+ Send Component ID : disabled -+ Associated Keyboard : none -+ Text : -+- Max. Text Size : 80 -++ Max. Text Size : 10 -+ -+ Text tInstruction -+ Attributes ++--- HMI/n2t-out/pageStartup.txt 2022-06-19 15:03:27.316416932 +0000 +++++ HMI/US/portrait/n2t-out/pageStartup.txt 2022-06-19 15:03:27.756426330 +0000 +diff -bur HMI/n2t-out/popupShutter.txt HMI/US/portrait/n2t-out/popupShutter.txt -+--- HMI/n2t-out/popupShutter.txt 2022-06-19 14:20:59.947205019 +0000 -++++ HMI/US/portrait/n2t-out/popupShutter.txt 2022-06-19 14:21:00.515209751 +0000 -+@@ -69,7 +69,7 @@ -+ Attributes -+ Scope : local -+ Text : -+- Max. Text Size: 80 -++ Max. Text Size: 10 -+ -+ Text tEntity -+ Attributes ++--- HMI/n2t-out/popupShutter.txt 2022-06-19 15:03:27.316416932 +0000 +++++ HMI/US/portrait/n2t-out/popupShutter.txt 2022-06-19 15:03:27.756426330 +0000 +@@ -181,7 +181,7 @@ + Touch Release Event + // event,buttonPress2,internalNameEntity,positionSlider,50 @@ -76,7 +55,13 @@ + //send calc crc + btlen tSend.txt,sys0 + crcrest 1,0xffff // reset CRC -+@@ -520,7 +520,6 @@ ++@@ -515,13 +515,11 @@ ++ tsw bTLeft,0 ++ spstr strCommand.txt,bTLeft.txt,"~",13 ++ bTLeft.pco=27501 ++- vis bTRight,1 ++ }else if(tTmp.txt=="enable") ++ { + spstr strCommand.txt,bTLeft.txt,"~",13 + tsw bTLeft,1 + bTLeft.pco=65535 @@ -84,7 +69,13 @@ + } + // set icon bStop + spstr strCommand.txt,tTmp.txt,"~",17 -+@@ -534,10 +533,9 @@ ++@@ -530,36 +528,24 @@ ++ tsw bTStop,0 ++ spstr strCommand.txt,bTStop.txt,"~",14 ++ bTStop.pco=27501 ++- vis bTRight,1 ++ }else if(tTmp.txt=="enable") ++ { + spstr strCommand.txt,bTStop.txt,"~",14 + tsw bTStop,1 + bTStop.pco=65535 @@ -95,7 +86,11 @@ + if(tTmp.txt=="disable") + { + spstr strCommand.txt,bTRight.txt,"~",15 -+@@ -548,15 +546,6 @@ ++ tsw bTRight,0 ++ bTRight.pco=27501 ++- vis bTRight,1 ++ }else if(tTmp.txt=="enable") ++ { + spstr strCommand.txt,bTRight.txt,"~",15 + tsw bTRight,1 + bTRight.pco=65535 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 d504f983..e9a68153 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 @@ -18,6 +18,10 @@ cardQR 32 Component(s) 374 Line(s) of event code 218 Unique line(s) of event code +popupLight + 27 Component(s) + 353 Line(s) of event code + 193 Unique line(s) of event code popupNotify 17 Component(s) 204 Line(s) of event code @@ -38,10 +42,6 @@ screensaver 38 Component(s) 319 Line(s) of event code 253 Unique line(s) of event code -popupLight - 27 Component(s) - 353 Line(s) of event code - 193 Unique line(s) of event code cardEntities 77 Component(s) 1363 Line(s) of event code diff --git a/HMI/US/portrait/n2t-out-visual/popupLight.txt b/HMI/US/portrait/n2t-out-visual/popupLight.txt index 05aac277..ee115234 100644 --- a/HMI/US/portrait/n2t-out-visual/popupLight.txt +++ b/HMI/US/portrait/n2t-out-visual/popupLight.txt @@ -320,7 +320,7 @@ Text tTmp Vertical Alignment : center Input Type : character Text : - Max. Text Size : 10 + Max. Text Size : 80 Word wrap : disabled Horizontal Spacing : 0 Vertical Spacing : 0 diff --git a/HMI/US/portrait/n2t-out-visual/popupShutter.txt b/HMI/US/portrait/n2t-out-visual/popupShutter.txt index b3fedb66..40c07549 100644 --- a/HMI/US/portrait/n2t-out-visual/popupShutter.txt +++ b/HMI/US/portrait/n2t-out-visual/popupShutter.txt @@ -82,7 +82,7 @@ Variable (string) tTmp ID : 19 Scope : local Text : - Max. Text Size: 10 + Max. Text Size: 80 Text tEntity Attributes diff --git a/HMI/US/portrait/n2t-out/popupLight.txt b/HMI/US/portrait/n2t-out/popupLight.txt index a8018887..e0c25405 100644 --- a/HMI/US/portrait/n2t-out/popupLight.txt +++ b/HMI/US/portrait/n2t-out/popupLight.txt @@ -151,7 +151,7 @@ Text tTmp Send Component ID : disabled Associated Keyboard : none Text : - Max. Text Size : 10 + Max. Text Size : 80 Text tInstruction Attributes diff --git a/HMI/US/portrait/n2t-out/popupShutter.txt b/HMI/US/portrait/n2t-out/popupShutter.txt index e70908fe..f4bf96d5 100644 --- a/HMI/US/portrait/n2t-out/popupShutter.txt +++ b/HMI/US/portrait/n2t-out/popupShutter.txt @@ -69,7 +69,7 @@ Variable (string) tTmp Attributes Scope : local Text : - Max. Text Size: 10 + Max. Text Size: 80 Text tEntity Attributes diff --git a/HMI/code_gen/localization/iobroker.py b/HMI/code_gen/localization/iobroker.py index b6dcb74d..6bc53529 100644 --- a/HMI/code_gen/localization/iobroker.py +++ b/HMI/code_gen/localization/iobroker.py @@ -57,6 +57,8 @@ def lookup(path_frontend_file, path_backend_file, lookupstr): def get_translation(locale, lookupstr): path_frontend_file, path_backend_file = build_locale_filestring(locale) res = lookup(path_frontend_file, path_backend_file, lookupstr) + if locale == "he_IL": + res = res[::-1] return res out = defaultdict(lambda: defaultdict(lambda: defaultdict(dict))) diff --git a/HMI/n2t-out-visual/nspanel_Stats.txt b/HMI/n2t-out-visual/nspanel_Stats.txt index f229eae6..388bfb17 100644 --- a/HMI/n2t-out-visual/nspanel_Stats.txt +++ b/HMI/n2t-out-visual/nspanel_Stats.txt @@ -20,7 +20,7 @@ popupNotify 128 Unique line(s) of event code popupShutter 25 Component(s) - 341 Line(s) of event code + 344 Line(s) of event code 175 Unique line(s) of event code cardMedia 34 Component(s) @@ -58,5 +58,5 @@ cardEntities Total 13 Page(s) 412 Component(s) - 4655 Line(s) of event code + 4658 Line(s) of event code 1245 Unique line(s) of event code diff --git a/HMI/n2t-out-visual/popupShutter.txt b/HMI/n2t-out-visual/popupShutter.txt index ebcccf63..637b6f5a 100644 --- a/HMI/n2t-out-visual/popupShutter.txt +++ b/HMI/n2t-out-visual/popupShutter.txt @@ -844,6 +844,7 @@ Timer tmSerial tsw bTLeft,0 spstr strCommand.txt,bTLeft.txt,"~",13 bTLeft.pco=27501 + vis bTRight,1 }else if(tTmp.txt=="enable") { spstr strCommand.txt,bTLeft.txt,"~",13 @@ -858,6 +859,7 @@ Timer tmSerial tsw bTStop,0 spstr strCommand.txt,bTStop.txt,"~",14 bTStop.pco=27501 + vis bTRight,1 }else if(tTmp.txt=="enable") { spstr strCommand.txt,bTStop.txt,"~",14 @@ -872,6 +874,7 @@ Timer tmSerial spstr strCommand.txt,bTRight.txt,"~",15 tsw bTRight,0 bTRight.pco=27501 + vis bTRight,1 }else if(tTmp.txt=="enable") { spstr strCommand.txt,bTRight.txt,"~",15 diff --git a/HMI/n2t-out/popupShutter.txt b/HMI/n2t-out/popupShutter.txt index 6d610623..d32a3f92 100644 --- a/HMI/n2t-out/popupShutter.txt +++ b/HMI/n2t-out/popupShutter.txt @@ -515,6 +515,7 @@ Timer tmSerial tsw bTLeft,0 spstr strCommand.txt,bTLeft.txt,"~",13 bTLeft.pco=27501 + vis bTRight,1 }else if(tTmp.txt=="enable") { spstr strCommand.txt,bTLeft.txt,"~",13 @@ -529,6 +530,7 @@ Timer tmSerial tsw bTStop,0 spstr strCommand.txt,bTStop.txt,"~",14 bTStop.pco=27501 + vis bTRight,1 }else if(tTmp.txt=="enable") { spstr strCommand.txt,bTStop.txt,"~",14 @@ -543,6 +545,7 @@ Timer tmSerial spstr strCommand.txt,bTRight.txt,"~",15 tsw bTRight,0 bTRight.pco=27501 + vis bTRight,1 }else if(tTmp.txt=="enable") { spstr strCommand.txt,bTRight.txt,"~",15 diff --git a/apps/nspanel-lovelace-ui/luibackend/icons.py b/apps/nspanel-lovelace-ui/luibackend/icons.py index e3ae3c85..fcb58c9c 100644 --- a/apps/nspanel-lovelace-ui/luibackend/icons.py +++ b/apps/nspanel-lovelace-ui/luibackend/icons.py @@ -77,7 +77,7 @@ cover_mapping = { def map_to_mdi_name(ha_type, state=None, device_class="_", cardType=None): if ha_type == "weather": return weather_mapping[state] if state in weather_mapping else "alert-circle-outline" - elif ha_type == "button": + elif ha_type in ["button", "navigate"]: return "gesture-tap-button" elif ha_type == "scene": return "palette" diff --git a/apps/nspanel-lovelace-ui/luibackend/pages.py b/apps/nspanel-lovelace-ui/luibackend/pages.py index 9e786fc6..007c58fe 100644 --- a/apps/nspanel-lovelace-ui/luibackend/pages.py +++ b/apps/nspanel-lovelace-ui/luibackend/pages.py @@ -165,26 +165,28 @@ class LuiPagesGen(object): if entityType == "navigate": page_search_res = self._config.searchCard(entityId) if page_search_res is not None: + icon_res = get_icon_id_ha("navigate", overwrite=icon) + status_entity = None name = name if name is not None else page_search_res.title text = get_translation(self._locale, "frontend.ui.card.button.press") - icon_id = get_icon_id(icon) if icon is not None else get_icon_id("gesture-tap-button") if item.status is not None and self._ha_api.entity_exists(item.status): status_entity = self._ha_api.get_entity(item.status) - icon_color = self.get_entity_color(status_entity) + icon_res = get_icon_id_ha(item.status.split(".")[0], state=status_entity.state, device_class=status_entity.attributes.get("device_class", "_"), overwrite=icon) + icon_color = self.get_entity_color(entity, overwrite=colorOverride) if item.status.startswith("sensor") and cardType == "cardGrid": - icon_id = status_entity.state[:4] - if icon_id[-1] == ".": - icon_id = icon_id[:-1] + icon_res = status_entity.state[:4] + if icon_res[-1] == ".": + icon_res = icon_res[:-1] else: - icon_color = 17299 - return f"~button~{entityId}~{icon_id}~{icon_color}~{name}~{text}" + icon_color = rgb_dec565(colorOverride) if colorOverride is not None and type(colorOverride) is list else 17299 + return f"~button~{entityId}~{icon_res}~{icon_color}~{name}~{text}" else: return f"~text~{entityId}~{get_icon_id('alert-circle-outline')}~17299~page not found~" if entityType == "iText": value = entityId.split(".", 2)[1] name = name if name is not None else "conf name missing" - icon_id = get_icon_id(icon) if icon is not None else get_icon_id("alert-circle-outline") - return f"~text~{entityId}~{icon_id}~17299~{name}~{value}" + icon_res = get_icon_id(icon) if icon is not None else get_icon_id("alert-circle-outline") + return f"~text~{entityId}~{icon_res}~17299~{name}~{value}" if not self._ha_api.entity_exists(entityId): return f"~text~{entityId}~{get_icon_id('alert-circle-outline')}~17299~Not found check~ apps.yaml" diff --git a/docs/faq.md b/docs/faq.md index bc9a3133..b3ca190c 100644 --- a/docs/faq.md +++ b/docs/faq.md @@ -68,12 +68,12 @@ Click download. 2. Restart AppDaemon -3. Flash current Development Firmware in Tasmota Console. DO NOT USE THIS URL (only if you are on main/dev) +3. Flash current Development Firmware in Tasmota Console. DO NOT USE THIS VERSION/URLS IF YOUR ARE NOT ON THE DEVELOPMENT VERSION -`FlashNextion http://nspanel.pky.eu/lui.tft` DO NOT USE THIS URL (only if you are on main/dev) +EU VERSION: `FlashNextion http://nspanel.pky.eu/lui.tft` Development happens in the EU version, so it is possible that the US Version isn't up to date with the current development version of the EU firmware, the lastet US versions are still downloadable with the following links: -`FlashNextion http://nspanel.pky.eu/lui-us-l.tft` DO NOT USE THIS URL (only if you are on main/dev) +US LANDSCAPE: `FlashNextion http://nspanel.pky.eu/lui-us-l.tft` -`FlashNextion http://nspanel.pky.eu/lui-us-p.tft` DO NOT USE THIS URL (only if you are on main/dev) +US PORTRAIT: `FlashNextion http://nspanel.pky.eu/lui-us-p.tft` diff --git a/ioBroker/NsPanelTs.ts b/ioBroker/NsPanelTs.ts index cd0de7c0..9ce83fd1 100644 --- a/ioBroker/NsPanelTs.ts +++ b/ioBroker/NsPanelTs.ts @@ -23,6 +23,7 @@ ReleaseNotes: - 19.06.2022 - V3.1.0 - Bugfix toLocalTimeString in en-EN/en-US - 19.06.2022 - V3.1.0 - Fehler in findLocale abgefangen - 19.06.2022 - V3.1.0 - Umstellung auf "Home Assistant" Sprachfile + - 19.06.2022 - V3.1.0 - Alias "light" und "socket" haben optionalen Parameter icon2 für negative Zustände Known Bug - Github Issue #286 @@ -183,7 +184,7 @@ var Test_Licht: PageEntities = "heading": "Color Aliase", "useColor": true, "subPage": false, - "parent": Test_Licht, + "parent": undefined, "items": [ { id: "alias.0.NSPanel_1.TestRGBLichteinzeln", name: "RGB-Licht Hex-Color", interpolateColor: true}, //{ id: "alias.0.NSPanel_1.TestFarbtemperatur", name: "Farbtemperatur", interpolateColor: true}, @@ -199,7 +200,7 @@ var Test_Funktionen: PageEntities = "heading": "Sonstige Aliase", "useColor": true, "subPage": false, - "parent": Test_Funktionen, + "parent": undefined, "items": [ { id: "alias.0.NSPanel_1.TestLautstärke", offColor: MSRed /*if mute=true*/, onColor: MSGreen ,name: "Echo Spot Büro", minValue: 0, maxValue: 100}, { id: "alias.0.NSPanel_1.TestTemperatur",name: "Temperatur außen", icon: "thermometer", onColor: White}, @@ -214,12 +215,13 @@ var Buero_Seite_1: PageEntities = "heading": "Büro", "useColor": true, "subPage": false, - "parent": Buero_Seite_1, + "parent": undefined, "items": [ { id: "alias.0.NSPanel_1.Schreibtischlampe", interpolateColor: true}, { id: "alias.0.NSPanel_1.Deckenbeleuchtung", interpolateColor: true}, { id: "alias.0.NSPanel_1.Testlampe2", name: "Filamentlampe", minValueBrightness: 0, maxValueBrightness: 70, interpolateColor: true}, - { id: "alias.0.NSPanel_1.Luftreiniger", icon: "power", offColor: MSRed, onColor: MSGreen} + { id: "alias.0.NSPanel_1.Luftreiniger", icon: "power", icon2: "",offColor: MSRed, onColor: MSGreen} + //{ id: "alias.0.NSPanel_1.TestVentil1", icon: "valve-open", icon2: "valve-closed",offColor: MSRed, onColor: MSGreen, name: "Test-Ventil 1"} ] }; @@ -229,7 +231,7 @@ var Fenster_1: PageEntities = "heading": "Fenster und Türen", "useColor": true, "subPage": false, - "parent": Fenster_1, + "parent": undefined, "items": [ { id: "alias.0.NSPanel_1.TestFenster", offColor: MSRed, onColor: MSGreen, name: "Büro Fenster"}, { id: "alias.0.NSPanel_1.Haustuer", offColor: MSRed, onColor: MSGreen, name: "Haustür"}, @@ -244,7 +246,7 @@ var Button_1: PageEntities = "heading": "Button Aliase", "useColor": true, "subPage": false, - "parent": Button_1, + "parent": undefined, "items": [ { id: "alias.0.NSPanel_1.TestTastensensor", name: "Tastensensor (FFN)"}, { id: "alias.0.NSPanel_1.Radio.NDR2", icon: "radio", name: "Taste (NDR2)", onColor: colorRadio}, @@ -257,7 +259,7 @@ var Subpages_1: PageEntities = "heading": "Test Subpages", "useColor": true, "subPage": false, - "parent": Subpages_1, + "parent": undefined, "items": [ { navigate: true, id: "Abfall", onColor: White, name: "Abfallkalender"}, { navigate: true, id: "WLAN", onColor: White, name: "Gäste WLAN"}, @@ -286,7 +288,7 @@ var Buero_Seite_2: PageGrid = "heading": "Büro 2", "useColor": true, "subPage": false, - "parent": Buero_Seite_2, + "parent": undefined, "items": [ { id: "alias.0.NSPanel_1.Schreibtischlampe", name: "Schreibtisch"}, { id: "alias.0.NSPanel_1.Deckenbeleuchtung", name: "Deckenlampe"}, @@ -303,7 +305,7 @@ var Alexa: PageMedia = "heading": "Alexa", "useColor": true, "subPage": false, - "parent": Alexa, + "parent": undefined, "items": [{ id: "alias.0.NSPanel_1.Alexa.PlayerBuero" }] }; @@ -313,7 +315,7 @@ var Buero_Themostat: PageThermo = "heading": "Test Thermostat", "useColor": true, "subPage": false, - "parent": Buero_Themostat, + "parent": undefined, "items": [{ id: "alias.0.NSPanel_1.Thermostat_Büro", minValue: 50, maxValue: 300 }] }; @@ -323,7 +325,7 @@ var Buero_Klimaanlage: PageThermo = "heading": "Test Klimaanlage", "useColor": true, "subPage": false, - "parent": Buero_Klimaanlage, + "parent": undefined, "items": [{ id: "alias.0.NSPanel_1.TestKlimaanlage", minValue: 170, maxValue: 250}] }; @@ -344,7 +346,7 @@ var Buero_Alarm: PageAlarm = "heading": "Alarm", "useColor": true, "subPage": false, - "parent": Buero_Alarm, + "parent": undefined, "items": [{ id: "alias.0.NSPanel_1.Alarm" }] }; @@ -354,7 +356,7 @@ var button1Page: PageGrid = "heading": "Radio", "useColor": true, "subPage": false, - "parent": button1Page, + "parent": undefined, "items": [ { id: "alias.0.NSPanel_1.Radio.FFN", icon: "radio", name: "FFN", onColor: colorRadio}, { id: "alias.0.NSPanel_1.Radio.Antenne" , icon: "radio", name: "Antenne Nds.", onColor: colorRadio}, @@ -371,7 +373,7 @@ var button2Page: PageEntities = "heading": "Büro", "useColor": true, "subPage": false, - "parent": button2Page, + "parent": undefined, "items": [ { id: "alias.0.NSPanel_1.Schreibtischlampe"}, { id: "alias.0.NSPanel_1.Deckenbeleuchtung"} @@ -385,7 +387,7 @@ var Service: PageEntities = "heading": "NSPanel Service", "useColor": true, "subPage": false, - "parent": Service, + "parent": undefined, "items": [ { id: "alias.0.NSPanel_1.NSPanel_AutoUpdate", name: "Auto-Updates" ,icon: "update", offColor: MSRed, onColor: MSGreen}, { navigate: true, id: "NSPanel_Infos", icon: "information-outline", onColor: White, name: "NSPanel Infos"}, @@ -451,7 +453,7 @@ export const config: Config = { dimmode: 8, active: 100, //Standard-Brightness TFT screenSaverDoubleClick: false, - locale: "en-US", //en-US, de-DE, nl-NL, da-DK, es-ES, fr-FR, it-IT, ru-RU, etc. + locale: "de-DE", //en-US, de-DE, nl-NL, da-DK, es-ES, fr-FR, it-IT, ru-RU, etc. timeFormat: "%H:%M", //currently not used dateFormat: "%A, %d. %B %Y", //currently not used weatherEntity: "alias.0.Wetter", @@ -559,7 +561,6 @@ check_updates(); function get_locales() { exec('curl https://raw.githubusercontent.com/joBr99/nspanel-lovelace-ui/main/ioBroker/ioBroker_NSPanel_locales.json', function (error, result, stderr){ if (result) { - let BerryDriverVersionOnline = result.substring((result.indexOf("version_of_this_script = ") + 24), result.indexOf("version_of_this_script = ") + 27).replace(/\s+/g, ''); createState(NSPanel_Path + "NSPanel_locales_json"); var timer = setTimeout(function() { setIfExists(NSPanel_Path + 'NSPanel_locales_json', result); @@ -1095,6 +1096,7 @@ function CreateEntity(pageItem: PageItem, placeId: number, useColors: boolean = case "light": type = "light" iconId = pageItem.icon !== undefined ? Icons.GetIcon(pageItem.icon) : o.common.role == "socket" ? Icons.GetIcon("power-socket-de") : Icons.GetIcon("lightbulb"); + var iconId2 = pageItem.icon2 !== undefined ? Icons.GetIcon(pageItem.icon2) : o.common.role == "socket" ? Icons.GetIcon("power-socket-de") : Icons.GetIcon("lightbulb"); var optVal = "0" if (val === true || val === "true") { @@ -1102,6 +1104,11 @@ function CreateEntity(pageItem: PageItem, placeId: number, useColors: boolean = iconColor = GetIconColor(pageItem, true, useColors); } else { iconColor = GetIconColor(pageItem, false, useColors); + if (pageItem.icon !== undefined) { + if (pageItem.icon2 !== undefined) { + iconId = iconId2; + } + } } return "~" + type + "~" + pageItem.id + "~" + iconId + "~" + iconColor + "~" + name + "~" + optVal; @@ -1981,9 +1988,7 @@ function HandleButtonEvent(words): void { } } else { if (Debug) console.log("bExit: " + words[4] + " - "+ pageId) - //Known Bug GitHub Issue #286 - //GeneratePage(activePage); - GeneratePage(config.pages[pageId]); + GeneratePage(activePage); } break; case "notifyAction": @@ -2960,6 +2965,7 @@ interface PageQR extends Page { type PageItem = { id: string, icon: (string | undefined), + icon2: (string | undefined), onColor: (RGB | undefined), offColor: (RGB | undefined), useColor: (boolean | undefined),