From f0a3a04edb2365b2e34e132c29740489a74a4e12 Mon Sep 17 00:00:00 2001 From: Thomas <101348966+tt-tom17@users.noreply.github.com> Date: Fri, 15 Sep 2023 19:20:53 +0200 Subject: [PATCH] v4.2.1.6 - Fix ServicePage Dimmode 'next' -> 'home' - Fix Log '.USERICON' to Debug.log - Fix Link PowerIcon to Alias (Thermocard) --- ioBroker/NsPanelTs.ts | 37 ++++++++++++++------------ ioBroker/NsPanelTs_without_Examples.ts | 33 ++++++++++++----------- 2 files changed, 38 insertions(+), 32 deletions(-) diff --git a/ioBroker/NsPanelTs.ts b/ioBroker/NsPanelTs.ts index a9e9d739..cda68926 100644 --- a/ioBroker/NsPanelTs.ts +++ b/ioBroker/NsPanelTs.ts @@ -1,5 +1,5 @@ /*----------------------------------------------------------------------- -TypeScript v4.2.1.5 zur Steuerung des SONOFF NSPanel mit dem ioBroker by @Armilar / @TT-Tom / @Sternmiere / @Britzelpuf / @ravenS0ne +TypeScript v4.2.1.6 zur Steuerung des SONOFF NSPanel mit dem ioBroker by @Armilar / @TT-Tom / @Sternmiere / @Britzelpuf / @ravenS0ne - abgestimmt auf TFT 52 / v4.2.1 / BerryDriver 8 / Tasmota 13.1.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 @@ -139,8 +139,8 @@ ReleaseNotes: - 23.04.2023 - v4.0.5.10 Fixed error wrong icon index in GeneratePowerPage by fre4242 - 28.04.2023 - v4.0.5.11 light 'hue' and light 'rgb' have '.TEMPERATURE' optional - 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 + - 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 - 12.08.2023 - v4.1.4 Upgrade TFT 51 / 4.1.4 - 12.08.2023 - v4.1.4.1 Fix Label CANCEL for popupTimer @@ -149,22 +149,25 @@ ReleaseNotes: - 12.08.2023 - v4.1.4.2 Add onStop function() to Schedules - 13.08.2023 - v4.1.4.3 Add InSel to popUpLight - 13.08.2023 - v4.1.4.4 Add Parameter inSel_ChoiceState to InSel to show/hide Focus - - 21.08.2023 - v4.2.0 Upgrade TFT 52 / 4.2.0 + - 21.08.2023 - v4.2.0 Upgrade TFT 52 / 4.2.0 - 21.08.2023 - v4.2.0 Add new alias state for iconcolor and buttontext for icon for subpages - - 22.08.2023 - v4.2.0.1 Add iconArray to Alias "Klimaanlage" (airCondition) - - 23.08.2023 - v4.2.0.2 Add CardGrid2 with maxItems = 8 + - 22.08.2023 - v4.2.0.1 Add iconArray to Alias "Klimaanlage" (airCondition) + - 23.08.2023 - v4.2.0.2 Add CardGrid2 with maxItems = 8 - 23.08.2023 - v4.2.1 Upgrade TFT 52 / 4.2.1 - - 23.08.2023 - v4.2.1.1 Add WINDOWOPEN to cardThermo (Thermostat) + - 23.08.2023 - v4.2.1.1 Add WINDOWOPEN to cardThermo (Thermostat) - 25.08.2023 - v4.2.1.2 Add Parameter fontSize for v4.3.0 - 27.08.2023 - v4.2.1.3 Add MQTT-Port-Check (use with exec) --> function CheckMQTTPorts() - 27.08.2023 - v4.2.1.3 Add MQTT-Port-Check for ServiceMenu - 01.09.2023 - v4.2.1.4 Fix iconId2 in Alias door/window - 02.09.2023 - v4.2.1.4 Add dynamically USERICON to Alias info - - 04.09.2023 - v4.2.1.5 Fix Debug with 0_userdata.0... - - 04.09.2023 - v4.2.1.5 Add minValue/maxValue to Blinds + - 04.09.2023 - v4.2.1.5 Fix Debug with 0_userdata.0... + - 04.09.2023 - v4.2.1.5 Add minValue/maxValue to Blinds + - 15.09.2023 - v4.2.1.6 Fix ServicePage Dimmode 'next' -> 'home' + - 15.09.2023 - v4.2.1.6 Fix Log '.USERICON' to Debug.log + - 15.09.2023 - v4.2.1.6 Fix Link PowerIcon to Alias (Thermocard) Next Release with TFT DEV (always implemented) - - 25.08.2023 - v4.3.0 Add Parameter fontSize (0-4) to cardGrid (with useValue) + - xx.xx.2023 - v4.3.0 Add Parameter fontSize (0-4) to cardGrid (with useValue) *********************************************************************************************************** @@ -913,11 +916,11 @@ let NSPanel_Service = let NSPanel_ScreensaverDimmode = { 'type': 'cardEntities', - 'heading': 'Dimmode (1)', + 'heading': 'Dimmode', 'useColor': true, 'subPage': true, 'parent': NSPanel_Screensaver, - 'next': 'NSPanel_ScreensaverOther', + 'home': 'NSPanel_Service', 'items': [ { id: AliasPath + 'Dimmode.brightnessDay', name: 'Brightness Tag', icon: 'brightness-5', offColor: Menu, onColor: Menu, minValue: 5, maxValue: 10}, { id: AliasPath + 'Dimmode.brightnessNight', name: 'Brightness Nacht', icon: 'brightness-4', offColor: Menu, onColor: Menu, minValue: 0, maxValue: 4}, @@ -1187,7 +1190,7 @@ export const config = { // bottomScreensaverEntity 4 { ScreensaverEntity: 'accuweather.0.Current.WindDirection', - ScreensaverEntityFactor: 0, + ScreensaverEntityFactor: 1, ScreensaverEntityDecimalPlaces: 0, ScreensaverEntityIconOn: 'windsock', ScreensaverEntityIconOff: null, @@ -1412,7 +1415,7 @@ async function CheckDebugMode() { console.log('Debugmodus aktiviert'); }else{ Debug = false; - console.log('Debugmodus deaktiviert') + console.log('Debugmodus deaktiviert'); } } catch (err) { @@ -3817,7 +3820,7 @@ function CreateEntity(pageItem: PageItem, placeId: number, useColors: boolean = if (existsState(pageItem.id + '.USERICON')) { iconId = Icons.GetIcon(getState(pageItem.id + '.USERICON').val); - console.log(iconId); + if (Debug) console.log('iconid von ' + pageItem.id + '.USERICON: ' + getState(pageItem.id + '.USERICON').val); RegisterEntityWatcher(pageItem.id + '.USERICON'); } @@ -4255,9 +4258,9 @@ function GenerateThermoPage(page: PageThermo): Payload[] { case 'POWER': if (existsState(id + '.POWER') && getState(id + '.POWER').val != null) { if (getState(id + '.POWER').val) { - bt[i - 1] = Icons.GetIcon('power-standby') + '~2016~1~' + 'POW' + '~'; + bt[i - 1] = Icons.GetIcon('power-standby') + '~2016~1~' + 'POWER' + '~'; } else { - bt[i - 1] = Icons.GetIcon('power-standby') + '~33840~1~' + 'POW' + '~'; + bt[i - 1] = Icons.GetIcon('power-standby') + '~33840~1~' + 'POWER' + '~'; } } else i--; break; diff --git a/ioBroker/NsPanelTs_without_Examples.ts b/ioBroker/NsPanelTs_without_Examples.ts index 0c5473c7..fa9ecdfe 100644 --- a/ioBroker/NsPanelTs_without_Examples.ts +++ b/ioBroker/NsPanelTs_without_Examples.ts @@ -1,5 +1,5 @@ /*----------------------------------------------------------------------- -TypeScript v4.2.1.5 zur Steuerung des SONOFF NSPanel mit dem ioBroker by @Armilar / @TT-Tom / @Sternmiere / @Britzelpuf / @ravenS0ne +TypeScript v4.2.1.6 zur Steuerung des SONOFF NSPanel mit dem ioBroker by @Armilar / @TT-Tom / @Sternmiere / @Britzelpuf / @ravenS0ne - abgestimmt auf TFT 52 / v4.2.1 / BerryDriver 8 / Tasmota 13.1.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 @@ -139,8 +139,8 @@ ReleaseNotes: - 23.04.2023 - v4.0.5.10 Fixed error wrong icon index in GeneratePowerPage by fre4242 - 28.04.2023 - v4.0.5.11 light 'hue' and light 'rgb' have '.TEMPERATURE' optional - 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 + - 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 - 12.08.2023 - v4.1.4 Upgrade TFT 51 / 4.1.4 - 12.08.2023 - v4.1.4.1 Fix Label CANCEL for popupTimer @@ -149,22 +149,25 @@ ReleaseNotes: - 12.08.2023 - v4.1.4.2 Add onStop function() to Schedules - 13.08.2023 - v4.1.4.3 Add InSel to popUpLight - 13.08.2023 - v4.1.4.4 Add Parameter inSel_ChoiceState to InSel to show/hide Focus - - 21.08.2023 - v4.2.0 Upgrade TFT 52 / 4.2.0 + - 21.08.2023 - v4.2.0 Upgrade TFT 52 / 4.2.0 - 21.08.2023 - v4.2.0 Add new alias state for iconcolor and buttontext for icon for subpages - - 22.08.2023 - v4.2.0.1 Add iconArray to Alias "Klimaanlage" (airCondition) - - 23.08.2023 - v4.2.0.2 Add CardGrid2 with maxItems = 8 + - 22.08.2023 - v4.2.0.1 Add iconArray to Alias "Klimaanlage" (airCondition) + - 23.08.2023 - v4.2.0.2 Add CardGrid2 with maxItems = 8 - 23.08.2023 - v4.2.1 Upgrade TFT 52 / 4.2.1 - - 23.08.2023 - v4.2.1.1 Add WINDOWOPEN to cardThermo (Thermostat) + - 23.08.2023 - v4.2.1.1 Add WINDOWOPEN to cardThermo (Thermostat) - 25.08.2023 - v4.2.1.2 Add Parameter fontSize for v4.3.0 - 27.08.2023 - v4.2.1.3 Add MQTT-Port-Check (use with exec) --> function CheckMQTTPorts() - 27.08.2023 - v4.2.1.3 Add MQTT-Port-Check for ServiceMenu - 01.09.2023 - v4.2.1.4 Fix iconId2 in Alias door/window - 02.09.2023 - v4.2.1.4 Add dynamically USERICON to Alias info - - 04.09.2023 - v4.2.1.5 Fix Debug with 0_userdata.0... - - 04.09.2023 - v4.2.1.5 Add minValue/maxValue to Blinds + - 04.09.2023 - v4.2.1.5 Fix Debug with 0_userdata.0... + - 04.09.2023 - v4.2.1.5 Add minValue/maxValue to Blinds + - 15.09.2023 - v4.2.1.6 Fix ServicePage Dimmode 'next' -> 'home' + - 15.09.2023 - v4.2.1.6 Fix Log '.USERICON' to Debug.log + - 15.09.2023 - v4.2.1.6 Fix Link PowerIcon to Alias (Thermocard) Next Release with TFT DEV (always implemented) - - 25.08.2023 - v4.3.0 Add Parameter fontSize (0-4) to cardGrid (with useValue) + - xx.xx.2023 - v4.3.0 Add Parameter fontSize (0-4) to cardGrid (with useValue) *********************************************************************************************************** @@ -517,11 +520,11 @@ let NSPanel_Service = let NSPanel_ScreensaverDimmode = { 'type': 'cardEntities', - 'heading': 'Dimmode (1)', + 'heading': 'Dimmode', 'useColor': true, 'subPage': true, 'parent': NSPanel_Screensaver, - 'next': 'NSPanel_ScreensaverOther', + 'home': 'NSPanel_Service', 'items': [ { id: AliasPath + 'Dimmode.brightnessDay', name: 'Brightness Tag', icon: 'brightness-5', offColor: Menu, onColor: Menu, minValue: 5, maxValue: 10}, { id: AliasPath + 'Dimmode.brightnessNight', name: 'Brightness Nacht', icon: 'brightness-4', offColor: Menu, onColor: Menu, minValue: 0, maxValue: 4}, @@ -3302,7 +3305,7 @@ function CreateEntity(pageItem: PageItem, placeId: number, useColors: boolean = if (existsState(pageItem.id + '.USERICON')) { iconId = Icons.GetIcon(getState(pageItem.id + '.USERICON').val); - console.log(iconId); + if (Debug) console.log('iconid von ' + pageItem.id + '.USERICON: ' + getState(pageItem.id + '.USERICON').val); RegisterEntityWatcher(pageItem.id + '.USERICON'); } @@ -3740,9 +3743,9 @@ function GenerateThermoPage(page: PageThermo): Payload[] { case 'POWER': if (existsState(id + '.POWER') && getState(id + '.POWER').val != null) { if (getState(id + '.POWER').val) { - bt[i - 1] = Icons.GetIcon('power-standby') + '~2016~1~' + 'POW' + '~'; + bt[i - 1] = Icons.GetIcon('power-standby') + '~2016~1~' + 'POWER' + '~'; } else { - bt[i - 1] = Icons.GetIcon('power-standby') + '~33840~1~' + 'POW' + '~'; + bt[i - 1] = Icons.GetIcon('power-standby') + '~33840~1~' + 'POWER' + '~'; } } else i--; break;