From 7f73e28861acfe07f3f46a47cd65aa1efd872937 Mon Sep 17 00:00:00 2001 From: Armilar <102996011+Armilar@users.noreply.github.com> Date: Sun, 13 Aug 2023 23:27:54 +0200 Subject: [PATCH] Update v4.1.4.4 NsPanelTs_without_Examples.ts - 12.08.2023 - v4.1.4 Upgrade TFT 51 / 4.1.4 - 12.08.2023 - v4.1.4.1 Fix Label CANCEL for popupTimer - 12.08.2023 - v4.1.4.1 Fix TypeScript Error (JS-Adapter > 7.1.X) by Gargano - 12.08.2023 - v4.1.4.1 CardGRid with maxItems = 8 - 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 --- ioBroker/NsPanelTs_without_Examples.ts | 28 +++++++++++++++++--------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/ioBroker/NsPanelTs_without_Examples.ts b/ioBroker/NsPanelTs_without_Examples.ts index 74243ec6..d7d20346 100644 --- a/ioBroker/NsPanelTs_without_Examples.ts +++ b/ioBroker/NsPanelTs_without_Examples.ts @@ -1,5 +1,5 @@ /*----------------------------------------------------------------------- -TypeScript v4.1.4.3 zur Steuerung des SONOFF NSPanel mit dem ioBroker by @Armilar / @Sternmiere / @Britzelpuf / @ravenS0ne / @TT-Tom +TypeScript v4.1.4.4 zur Steuerung des SONOFF NSPanel mit dem ioBroker by @Armilar / @Sternmiere / @Britzelpuf / @ravenS0ne / @TT-Tom - abgestimmt auf TFT 51 / v4.1.4 / BerryDriver 8 / Tasmota 13.0.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 @@ -147,7 +147,8 @@ ReleaseNotes: - 12.08.2023 - v4.1.4.1 Fix TypeScript Error (JS-Adapter > 7.1.X) by Gargano - 12.08.2023 - v4.1.4.1 CardGRid with maxItems = 8 - 12.08.2023 - v4.1.4.2 Add onStop function() to Schedules - - 12.08.2023 - v4.1.4.3 Add InSel to popUpLight + - 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 *********************************************************************************************************** @@ -6424,11 +6425,14 @@ function GenerateDetailPage(type: string, optional: string, pageItem: PageItem): } else if (o.common.role == 'buttonSensor') { let actualValue: string = ''; - if (existsObject(pageItem.id + '.VALUE')) { - actualValue = formatInSelText(pageItem.modeList[getState(pageItem.id + '.VALUE').val]); - RegisterDetailEntityWatcher(id + '.VALUE', pageItem, type); - } + if (pageItem.inSel_ChoiceState || pageItem.inSel_ChoiceState == undefined) { + if (existsObject(pageItem.id + '.VALUE')) { + actualValue = formatInSelText(pageItem.modeList[getState(pageItem.id + '.VALUE').val]); + RegisterDetailEntityWatcher(id + '.VALUE', pageItem, type); + } + } + let tempModeList = []; for (let i = 0; i < pageItem.modeList.length; i++) { tempModeList[i] = formatInSelText(pageItem.modeList[i]); @@ -6454,11 +6458,14 @@ function GenerateDetailPage(type: string, optional: string, pageItem: PageItem): if (pageItem.modeList != undefined) { let actualValue: string = ''; - if (existsObject(pageItem.id + '.VALUE')) { - actualValue = formatInSelText(pageItem.modeList[getState(pageItem.id + '.VALUE').val]); - RegisterDetailEntityWatcher(id + '.VALUE', pageItem, type); + + if (pageItem.inSel_ChoiceState || pageItem.inSel_ChoiceState == undefined) { + if (existsObject(pageItem.id + '.VALUE')) { + actualValue = formatInSelText(pageItem.modeList[getState(pageItem.id + '.VALUE').val]); + RegisterDetailEntityWatcher(id + '.VALUE', pageItem, type); + } } - + let tempModeList = []; for (let i = 0; i < pageItem.modeList.length; i++) { tempModeList[i] = formatInSelText(pageItem.modeList[i]); @@ -7806,6 +7813,7 @@ type PageItem = { popupOptions: (string[] | undefined), useValue: (boolean | undefined), monobutton: (boolean | undefined) + inSel_ChoiceState: (boolean | undefined) } type DimMode = {