From cc21d555c543553106a0f0cb75aca1fafb6095a3 Mon Sep 17 00:00:00 2001 From: Thomas <101348966+tt-tom17@users.noreply.github.com> Date: Sat, 18 Nov 2023 21:20:27 +0100 Subject: [PATCH 01/17] v4.3.3.x Create Alias for PageAlarm --- ioBroker/NsPanelTs.ts | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/ioBroker/NsPanelTs.ts b/ioBroker/NsPanelTs.ts index bcf3e554..bde8d9a1 100644 --- a/ioBroker/NsPanelTs.ts +++ b/ioBroker/NsPanelTs.ts @@ -4699,14 +4699,25 @@ function GenerateAlarmPage(page: PageAlarm): Payload[] { out_msgs.push({ payload: 'pageType~cardAlarm' }); let nsPath = NSPanel_Alarm_Path + 'Alarm.'; - if (existsState(nsPath + 'AlarmPin') == false || existsState(nsPath + 'AlarmState') == false || existsState(nsPath + 'AlarmType') == false || existsState(nsPath + 'PIN_Failed') == false || existsState(nsPath + 'PANEL') == false) { - createState(nsPath + 'AlarmPin', '0000', { type: 'string' }, function () { setState(nsPath + 'AlarmPin', '0000') }); - createState(nsPath + 'AlarmState', 'disarmed', { type: 'string' }, function () { setState(nsPath + 'AlarmState', 'disarmed') }); - createState(nsPath + 'AlarmType', 'D1', { type: 'string' }, function () { setState(nsPath + 'AlarmType', 'D1') }); - createState(nsPath + 'PIN_Failed', 0, { type: 'number' }, function () { setState(nsPath + 'PIN_Failed', 0) }); - createState(nsPath + 'PANEL', NSPanel_Path, { type: 'string' }, function () { setState(nsPath + 'PANEL', NSPanel_Path) }); + if (isSetOptionActive) { + if (existsState(nsPath + 'AlarmPin') == false || existsState(nsPath + 'AlarmState') == false || existsState(nsPath + 'AlarmType') == false || existsState(nsPath + 'PIN_Failed') == false || existsState(nsPath + 'PANEL') == false) { + createState(nsPath + 'AlarmPin', '0000', { type: 'string' }, function () { setState(nsPath + 'AlarmPin', '0000') }); + createState(nsPath + 'AlarmState', 'disarmed', { type: 'string' }, function () { setState(nsPath + 'AlarmState', 'disarmed') }); + createState(nsPath + 'AlarmType', 'D1', { type: 'string' }, function () { setState(nsPath + 'AlarmType', 'D1') }); + createState(nsPath + 'PIN_Failed', 0, { type: 'number' }, function () { setState(nsPath + 'PIN_Failed', 0) }); + createState(nsPath + 'PANEL', NSPanel_Path, { type: 'string' }, function () { setState(nsPath + 'PANEL', NSPanel_Path) }); + if (autoCreateAlias) { + setObject(AliasPath + 'Alarm', {type: 'channel', common: {role: 'sensor.alarm.fire', name:'Alarm'}, native: {}}); + await createAliasAsync(AliasPath + 'Alarm.ACTUAL', nsPath + 'AlarmState', true, { type: 'string', role: 'state', name: 'ACTUAL' }); + await createAliasAsync(AliasPath + 'Alarm.PIN', nsPath + 'AlarmPin', true, { type: 'string', role: 'state', name: 'PIN' }); + await createAliasAsync(AliasPath + 'Alarm.TYPE', nsPath + 'AlarmType', true, { type: 'string', role: 'state', name: 'TYPE' }); + await createAliasAsync(AliasPath + 'Alarm.PIN_Failed', nsPath + 'PIN_Failed', true, { type: 'string', role: 'state', name: 'PIN_Failed' }); + await createAliasAsync(AliasPath + 'Alarm.PANEL', nsPath + 'PANEL', true, { type: 'string', role: 'state', name: 'PANEL' }); + } + } } + if (existsState(nsPath + 'AlarmPin') && existsState(nsPath + 'AlarmState') && existsState(nsPath + 'AlarmType')) { //let entityPin = getState(nsPath + 'AlarmPin').val; let entityState = getState(nsPath + 'AlarmState').val; From 8dc2e6cbe11bc66194f3fef045f802b0b97d2308 Mon Sep 17 00:00:00 2001 From: Thomas <101348966+tt-tom17@users.noreply.github.com> Date: Sat, 18 Nov 2023 22:18:10 +0100 Subject: [PATCH 02/17] v4.3.3.x Create Alias for PageAlarm --- ioBroker/NsPanelTs.ts | 48 +++++++++++++++++++++++++++---------------- 1 file changed, 30 insertions(+), 18 deletions(-) diff --git a/ioBroker/NsPanelTs.ts b/ioBroker/NsPanelTs.ts index bde8d9a1..76573f90 100644 --- a/ioBroker/NsPanelTs.ts +++ b/ioBroker/NsPanelTs.ts @@ -4689,6 +4689,35 @@ function GenerateMediaPage(page: PageMedia): Payload[] { } } +async function createAutoAlarmAlias (nsPath: string){ + try { + let Alias_Alarm_Path = 'alias.0.' + nsPath.substring(13, nsPath.length) + if (Debug){ + console.log('Alarm Alias Path: ' + Alias_Alarm_Path); + console.log('Alarm 0_userdata Path: ' + nsPath); + } + if (autoCreateAlias) { + if (isSetOptionActive) { + if (existsState(nsPath + 'AlarmPin') == false || existsState(nsPath + 'AlarmState') == false || existsState(nsPath + 'AlarmType') == false || existsState(nsPath + 'PIN_Failed') == false || existsState(nsPath + 'PANEL') == false) { + await createStateAsync(nsPath + 'AlarmPin', '0000', { type: 'string' }); + await createStateAsync(nsPath + 'AlarmState', 'disarmed', { type: 'string' }); + await createStateAsync(nsPath + 'AlarmType', 'D1', { type: 'string' }); + await createStateAsync(nsPath + 'PIN_Failed', 0, { type: 'number' }); + await createStateAsync(nsPath + 'PANEL', NSPanel_Path, { type: 'string' }); + setObject(Alias_Alarm_Path + 'Alarm', {type: 'channel', common: {role: 'sensor.alarm.fire', name:'Alarm'}, native: {}}); + await createAliasAsync(Alias_Alarm_Path + 'Alarm.ACTUAL', nsPath + 'AlarmState', true, { type: 'string', role: 'state', name: 'ACTUAL' }); + await createAliasAsync(Alias_Alarm_Path + 'Alarm.PIN', nsPath + 'AlarmPin', true, { type: 'string', role: 'state', name: 'PIN' }); + await createAliasAsync(Alias_Alarm_Path + 'Alarm.TYPE', nsPath + 'AlarmType', true, { type: 'string', role: 'state', name: 'TYPE' }); + await createAliasAsync(Alias_Alarm_Path + 'Alarm.PIN_Failed', nsPath + 'PIN_Failed', true, { type: 'string', role: 'state', name: 'PIN_Failed' }); + await createAliasAsync(Alias_Alarm_Path + 'Alarm.PANEL', nsPath + 'PANEL', true, { type: 'string', role: 'state', name: 'PANEL' }); + } + } + } + } catch (err) { + console.warn('error at function createAutoAlarmAlias: ' + err.message); + } +} + function GenerateAlarmPage(page: PageAlarm): Payload[] { try { activePage = page; @@ -4699,24 +4728,7 @@ function GenerateAlarmPage(page: PageAlarm): Payload[] { out_msgs.push({ payload: 'pageType~cardAlarm' }); let nsPath = NSPanel_Alarm_Path + 'Alarm.'; - if (isSetOptionActive) { - if (existsState(nsPath + 'AlarmPin') == false || existsState(nsPath + 'AlarmState') == false || existsState(nsPath + 'AlarmType') == false || existsState(nsPath + 'PIN_Failed') == false || existsState(nsPath + 'PANEL') == false) { - createState(nsPath + 'AlarmPin', '0000', { type: 'string' }, function () { setState(nsPath + 'AlarmPin', '0000') }); - createState(nsPath + 'AlarmState', 'disarmed', { type: 'string' }, function () { setState(nsPath + 'AlarmState', 'disarmed') }); - createState(nsPath + 'AlarmType', 'D1', { type: 'string' }, function () { setState(nsPath + 'AlarmType', 'D1') }); - createState(nsPath + 'PIN_Failed', 0, { type: 'number' }, function () { setState(nsPath + 'PIN_Failed', 0) }); - createState(nsPath + 'PANEL', NSPanel_Path, { type: 'string' }, function () { setState(nsPath + 'PANEL', NSPanel_Path) }); - if (autoCreateAlias) { - setObject(AliasPath + 'Alarm', {type: 'channel', common: {role: 'sensor.alarm.fire', name:'Alarm'}, native: {}}); - await createAliasAsync(AliasPath + 'Alarm.ACTUAL', nsPath + 'AlarmState', true, { type: 'string', role: 'state', name: 'ACTUAL' }); - await createAliasAsync(AliasPath + 'Alarm.PIN', nsPath + 'AlarmPin', true, { type: 'string', role: 'state', name: 'PIN' }); - await createAliasAsync(AliasPath + 'Alarm.TYPE', nsPath + 'AlarmType', true, { type: 'string', role: 'state', name: 'TYPE' }); - await createAliasAsync(AliasPath + 'Alarm.PIN_Failed', nsPath + 'PIN_Failed', true, { type: 'string', role: 'state', name: 'PIN_Failed' }); - await createAliasAsync(AliasPath + 'Alarm.PANEL', nsPath + 'PANEL', true, { type: 'string', role: 'state', name: 'PANEL' }); - } - } - } - + createAutoAlarmAlias(nsPath); if (existsState(nsPath + 'AlarmPin') && existsState(nsPath + 'AlarmState') && existsState(nsPath + 'AlarmType')) { //let entityPin = getState(nsPath + 'AlarmPin').val; From ed655d6596841ea3c10b9599e09fede4691cf781 Mon Sep 17 00:00:00 2001 From: Thomas <101348966+tt-tom17@users.noreply.github.com> Date: Sat, 18 Nov 2023 22:36:43 +0100 Subject: [PATCH 03/17] v4.3.3.x Create alias for Alarm Page --- ioBroker/NsPanelTs.ts | 39 ++++++++++++++++++++------------------- 1 file changed, 20 insertions(+), 19 deletions(-) diff --git a/ioBroker/NsPanelTs.ts b/ioBroker/NsPanelTs.ts index 76573f90..9c6808c4 100644 --- a/ioBroker/NsPanelTs.ts +++ b/ioBroker/NsPanelTs.ts @@ -4689,27 +4689,26 @@ function GenerateMediaPage(page: PageMedia): Payload[] { } } -async function createAutoAlarmAlias (nsPath: string){ +async function createAutoAlarmAlias (id: string, nsPath: string){ try { - let Alias_Alarm_Path = 'alias.0.' + nsPath.substring(13, nsPath.length) if (Debug){ - console.log('Alarm Alias Path: ' + Alias_Alarm_Path); + console.log('Alarm Alias Path: ' + id); console.log('Alarm 0_userdata Path: ' + nsPath); } if (autoCreateAlias) { if (isSetOptionActive) { - if (existsState(nsPath + 'AlarmPin') == false || existsState(nsPath + 'AlarmState') == false || existsState(nsPath + 'AlarmType') == false || existsState(nsPath + 'PIN_Failed') == false || existsState(nsPath + 'PANEL') == false) { - await createStateAsync(nsPath + 'AlarmPin', '0000', { type: 'string' }); - await createStateAsync(nsPath + 'AlarmState', 'disarmed', { type: 'string' }); - await createStateAsync(nsPath + 'AlarmType', 'D1', { type: 'string' }); - await createStateAsync(nsPath + 'PIN_Failed', 0, { type: 'number' }); - await createStateAsync(nsPath + 'PANEL', NSPanel_Path, { type: 'string' }); - setObject(Alias_Alarm_Path + 'Alarm', {type: 'channel', common: {role: 'sensor.alarm.fire', name:'Alarm'}, native: {}}); - await createAliasAsync(Alias_Alarm_Path + 'Alarm.ACTUAL', nsPath + 'AlarmState', true, { type: 'string', role: 'state', name: 'ACTUAL' }); - await createAliasAsync(Alias_Alarm_Path + 'Alarm.PIN', nsPath + 'AlarmPin', true, { type: 'string', role: 'state', name: 'PIN' }); - await createAliasAsync(Alias_Alarm_Path + 'Alarm.TYPE', nsPath + 'AlarmType', true, { type: 'string', role: 'state', name: 'TYPE' }); - await createAliasAsync(Alias_Alarm_Path + 'Alarm.PIN_Failed', nsPath + 'PIN_Failed', true, { type: 'string', role: 'state', name: 'PIN_Failed' }); - await createAliasAsync(Alias_Alarm_Path + 'Alarm.PANEL', nsPath + 'PANEL', true, { type: 'string', role: 'state', name: 'PANEL' }); + if (existsState(nsPath + '.AlarmPin') == false || existsState(nsPath + '.AlarmState') == false || existsState(nsPath + '.AlarmType') == false || existsState(nsPath + '.PIN_Failed') == false || existsState(nsPath + '.PANEL') == false) { + await createStateAsync(nsPath + '.AlarmPin', '0000', { type: 'string' }); + await createStateAsync(nsPath + '.AlarmState', 'disarmed', { type: 'string' }); + await createStateAsync(nsPath + '.AlarmType', 'D1', { type: 'string' }); + await createStateAsync(nsPath + '.PIN_Failed', 0, { type: 'number' }); + await createStateAsync(nsPath + '.PANEL', NSPanel_Path, { type: 'string' }); + setObject(id, {_id: id, type: 'channel', common: {role: 'sensor.fire.alarm', name:'alarm'}, native: {}}); + await createAliasAsync(id + '.ACTUAL', nsPath + '.AlarmState', true, { type: 'string', role: 'state', name: 'ACTUAL' }); + await createAliasAsync(id + '.PIN', nsPath + '.AlarmPin', true, { type: 'string', role: 'state', name: 'PIN' }); + await createAliasAsync(id + '.TYPE', nsPath + '.AlarmType', true, { type: 'string', role: 'state', name: 'TYPE' }); + await createAliasAsync(id + '.PIN_Failed', nsPath + '.PIN_Failed', true, { type: 'string', role: 'state', name: 'PIN_Failed' }); + await createAliasAsync(id + '.PANEL', nsPath + '.PANEL', true, { type: 'string', role: 'state', name: 'PANEL' }); } } } @@ -4726,13 +4725,15 @@ function GenerateAlarmPage(page: PageAlarm): Payload[] { let out_msgs: Array = []; out_msgs.push({ payload: 'pageType~cardAlarm' }); - let nsPath = NSPanel_Alarm_Path + 'Alarm.'; + let nsPath = NSPanel_Alarm_Path + 'Alarm'; - createAutoAlarmAlias(nsPath); + if (page.items[0].autoCreateALias) { + createAutoAlarmAlias(id, nsPath); + } - if (existsState(nsPath + 'AlarmPin') && existsState(nsPath + 'AlarmState') && existsState(nsPath + 'AlarmType')) { + if (existsState(nsPath + '.AlarmPin') && existsState(nsPath + '.AlarmState') && existsState(nsPath + '.AlarmType')) { //let entityPin = getState(nsPath + 'AlarmPin').val; - let entityState = getState(nsPath + 'AlarmState').val; + let entityState = getState(nsPath + '.AlarmState').val; //let entityType = getState(nsPath + 'AlarmType').val; let arm1: string, arm2: string, arm3: string, arm4: string; let arm1ActionName: string, arm2ActionName: string, arm3ActionName: string, arm4ActionName: string; From 3a1b9071f8437c700760fb094f7f162812b3bf20 Mon Sep 17 00:00:00 2001 From: Thomas <101348966+tt-tom17@users.noreply.github.com> Date: Sat, 18 Nov 2023 22:42:38 +0100 Subject: [PATCH 04/17] Update NsPanelTs.ts --- ioBroker/NsPanelTs.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ioBroker/NsPanelTs.ts b/ioBroker/NsPanelTs.ts index 9c6808c4..6a6c9214 100644 --- a/ioBroker/NsPanelTs.ts +++ b/ioBroker/NsPanelTs.ts @@ -4707,7 +4707,7 @@ async function createAutoAlarmAlias (id: string, nsPath: string){ await createAliasAsync(id + '.ACTUAL', nsPath + '.AlarmState', true, { type: 'string', role: 'state', name: 'ACTUAL' }); await createAliasAsync(id + '.PIN', nsPath + '.AlarmPin', true, { type: 'string', role: 'state', name: 'PIN' }); await createAliasAsync(id + '.TYPE', nsPath + '.AlarmType', true, { type: 'string', role: 'state', name: 'TYPE' }); - await createAliasAsync(id + '.PIN_Failed', nsPath + '.PIN_Failed', true, { type: 'string', role: 'state', name: 'PIN_Failed' }); + await createAliasAsync(id + '.PIN_Failed', nsPath + '.PIN_Failed', true, { type: 'number', role: 'state', name: 'PIN_Failed' }); await createAliasAsync(id + '.PANEL', nsPath + '.PANEL', true, { type: 'string', role: 'state', name: 'PANEL' }); } } From b1d0ad8e1600b0dc5f912b1eae1f58c488f4cfb3 Mon Sep 17 00:00:00 2001 From: Thomas <101348966+tt-tom17@users.noreply.github.com> Date: Mon, 20 Nov 2023 10:43:08 +0100 Subject: [PATCH 05/17] v4.3.3.x create Alias for PageAlarm --- ioBroker/NsPanelTs.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ioBroker/NsPanelTs.ts b/ioBroker/NsPanelTs.ts index 6a6c9214..a9907e28 100644 --- a/ioBroker/NsPanelTs.ts +++ b/ioBroker/NsPanelTs.ts @@ -4747,7 +4747,7 @@ function GenerateAlarmPage(page: PageAlarm): Payload[] { } if (entityState == 'armed' || entityState == 'triggered') { - arm1 = 'Deaktivieren'; //arm1*~* + arm1 = findLocale('alarm_control_panel', 'disarm') //'Deaktivieren'; //arm1*~* arm1ActionName = 'D1'; //arm1ActionName*~* arm2 = ''; //arm2*~* arm2ActionName = ''; //arm2ActionName*~* @@ -4758,13 +4758,13 @@ function GenerateAlarmPage(page: PageAlarm): Payload[] { } if (entityState == 'disarmed' || entityState == 'arming' || entityState == 'pending') { - arm1 = 'Vollschutz'; //arm1*~* + arm1 = findLocale('alarm_control_panel','arm_away'); //'Vollschutz' //arm1*~* arm1ActionName = 'A1'; //arm1ActionName*~* - arm2 = 'Zuhause'; //arm2*~* + arm2 = findLocale('alarm_control_panel', 'arm_home'); //'Zuhause'; //arm2*~* arm2ActionName = 'A2'; //arm2ActionName*~* - arm3 = 'Nacht'; //arm3*~* + arm3 = findLocale('alarm_control_panel', 'arm_night'); //'Nacht'; //arm3*~* arm3ActionName = 'A3'; //arm3ActionName*~* - arm4 = 'Besuch'; //arm4*~* + arm4 = findLocale('alarm_control_panel', 'arm_vacation') //'Besuch'; //arm4*~* arm4ActionName = 'A4'; //arm4ActionName*~* } From 0fa7e8f562c53a9de198f3f562a333ebdb91d18d Mon Sep 17 00:00:00 2001 From: Thomas <101348966+tt-tom17@users.noreply.github.com> Date: Mon, 20 Nov 2023 11:51:00 +0100 Subject: [PATCH 06/17] v4.3.3.x -auto create Alais for PageAlarm -variable String for Button on PageAlarm --- ioBroker/NsPanelTs.ts | 58 +++++++++++++++++++++++++++++++++++-------- 1 file changed, 47 insertions(+), 11 deletions(-) diff --git a/ioBroker/NsPanelTs.ts b/ioBroker/NsPanelTs.ts index a9907e28..32831045 100644 --- a/ioBroker/NsPanelTs.ts +++ b/ioBroker/NsPanelTs.ts @@ -261,7 +261,18 @@ const swWindy: RGB = { red: 150, green: 150, blue: 150}; //-- Anfang der Beispiele für Seitengestaltung -- Selbstdefinierte Aliase erforderlich ----------------------- //-- siehe https://github.com/joBr99/nspanel-lovelace-ui/wiki/NSPanel-Page-%E2%80%90-Typen_How-2_Beispiele - + let Alarmseite = + { + "type": "cardAlarm", + "heading": "Alarm", + "useColor": true, + "subPage": false, + "items": [ + { id: 'alias.0.NSPanel.Alarm', + actionArray: ['Vollschhutz','Zuhause','Nacht','Besuch','Ausschalten'], + autoCreateALias: true } + ] + } //-- ENDE der Beispiele für Seitengestaltung -- Selbstdefinierte Aliase erforderlich ------------------------- @@ -757,7 +768,7 @@ export const config = { defaultColor: Off, defaultBackgroundColor: HMIDark, // Default-Hintergrundfarbe HMIDark oder Black pages: [ - + Alarmseite, NSPanel_Service //Auto-Alias Service Page //Unlock_Service //Auto-Alias Service Page (Service Pages used with cardUnlock) ], @@ -4747,7 +4758,11 @@ function GenerateAlarmPage(page: PageAlarm): Payload[] { } if (entityState == 'armed' || entityState == 'triggered') { - arm1 = findLocale('alarm_control_panel', 'disarm') //'Deaktivieren'; //arm1*~* + if (page.items[0].actionArray !== undefined && page.items[0].actionArray[4] !== '') { + arm1 = page.items[0].actionArray[4]; + } else { + arm1 = findLocale('alarm_control_panel', 'disarm'); //'Deaktivieren'; //arm1*~* + } arm1ActionName = 'D1'; //arm1ActionName*~* arm2 = ''; //arm2*~* arm2ActionName = ''; //arm2ActionName*~* @@ -4758,14 +4773,34 @@ function GenerateAlarmPage(page: PageAlarm): Payload[] { } if (entityState == 'disarmed' || entityState == 'arming' || entityState == 'pending') { - arm1 = findLocale('alarm_control_panel','arm_away'); //'Vollschutz' //arm1*~* - arm1ActionName = 'A1'; //arm1ActionName*~* - arm2 = findLocale('alarm_control_panel', 'arm_home'); //'Zuhause'; //arm2*~* - arm2ActionName = 'A2'; //arm2ActionName*~* - arm3 = findLocale('alarm_control_panel', 'arm_night'); //'Nacht'; //arm3*~* - arm3ActionName = 'A3'; //arm3ActionName*~* - arm4 = findLocale('alarm_control_panel', 'arm_vacation') //'Besuch'; //arm4*~* - arm4ActionName = 'A4'; //arm4ActionName*~* + if (page.items[0].actionArray !== undefined && page.items[0].actionArray[0] !== '') { + arm1 = page.items[0].actionArray[0]; + } else { + arm1 = findLocale('alarm_control_panel', 'arm_away'); //'Vollschutz' //arm1*~* + } + arm1ActionName = 'A1'; //arm1ActionName*~* + if (page.items[0].actionArray !== undefined && page.items[0].actionArray[1] !== '') { + arm2 = page.items[0].actionArray[1]; + } else { + arm2 = findLocale('alarm_control_panel', 'arm_home'); //'Zuhause'; //arm2*~* + } + arm2ActionName = 'A2'; //arm2ActionName*~* + if (page.items[0].actionArray !== undefined && page.items[0].actionArray[2] !== '') { + arm3 = page.items[0].actionArray[2]; + } else { + arm3 = findLocale('alarm_control_panel', 'arm_night'); //'Nacht'; //arm3*~* + } + arm3ActionName = 'A3'; //arm3ActionName*~* + if (page.items[0].actionArray !== undefined && page.items[0].actionArray[3] !== '') { + arm4 = page.items[0].actionArray[3]; + } else { + arm4 = findLocale('alarm_control_panel', 'arm_vacation'); //'Besuch'; //arm4*~* + } + arm4ActionName = 'A4'; //arm4ActionName*~* + } + + if (Debug) { + console.log('GenerateAlarmPage String for arm1: ' + arm1 + ', arm2: ' + arm2 + ', arm3: ' + arm3 + ', arm4: ' + arm4); } if (entityState == 'armed') { @@ -8268,6 +8303,7 @@ type PageItem = { inSel_ChoiceState: (boolean | undefined), iconArray: (string[] | undefined), fontSize: (number | undefined), + actionArray: (string[] | undefined), } type DimMode = { From c2599ed4a3119acec60f6daa42a4bdf4c8031bd3 Mon Sep 17 00:00:00 2001 From: Thomas <101348966+tt-tom17@users.noreply.github.com> Date: Mon, 20 Nov 2023 12:03:27 +0100 Subject: [PATCH 07/17] v4.3.3.6 - Add autoCreateALias to PageAlarm - Add actionStringArray to PageAlarm --- ioBroker/NsPanelTs.ts | 47 +++++++++++++++++++++++-------------------- 1 file changed, 25 insertions(+), 22 deletions(-) diff --git a/ioBroker/NsPanelTs.ts b/ioBroker/NsPanelTs.ts index 32831045..79e68f79 100644 --- a/ioBroker/NsPanelTs.ts +++ b/ioBroker/NsPanelTs.ts @@ -1,5 +1,5 @@ /*----------------------------------------------------------------------- -TypeScript v4.3.3.5 zur Steuerung des SONOFF NSPanel mit dem ioBroker by @Armilar / @TT-Tom / @Sternmiere / @Britzelpuf / @ravenS0ne +TypeScript v4.3.3.6 zur Steuerung des SONOFF NSPanel mit dem ioBroker by @Armilar / @TT-Tom / @Sternmiere / @Britzelpuf / @ravenS0ne - abgestimmt auf TFT 53 / v4.3.3 / BerryDriver 9 / Tasmota 13.2.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 @@ -53,7 +53,10 @@ ReleaseNotes: - 13.11.2023 - v4.3.3.3 if setOption = false, do not create autoAlias (Functional/Servicemenu) and Datapoints - 15.11.2023 - v4.3.3.4 New Service Page -> ioBroker Info - 16.11.2023 - v4.3.3.5 Add Multilingualism to Service Menu (39 languages) - - 17.11.2023 - v4.3.3.5 Add Multilingualism to cardQR, popupFan, popupTimer (39 languages) + - 17.11.2023 - v4.3.3.5 Add Multilingualism to cardQR, popupFan, popupTimer (39 languages) + - 18.11.2023 - v4.3.3.6 Add autoCreateALias to PageAlarm + - 20.11.2023 - v4.3.3.6 Add actionStringArray to PageAlarm + Todo: - XX.XX.XXXX - v4.4.0 Change the bottomScreensaverEntity (rolling) if more than 6 entries are defined @@ -269,7 +272,7 @@ const swWindy: RGB = { red: 150, green: 150, blue: 150}; "subPage": false, "items": [ { id: 'alias.0.NSPanel.Alarm', - actionArray: ['Vollschhutz','Zuhause','Nacht','Besuch','Ausschalten'], + actionStringArray: ['Vollschhutz','Zuhause','Nacht','Besuch','Ausschalten'], autoCreateALias: true } ] } @@ -4758,8 +4761,8 @@ function GenerateAlarmPage(page: PageAlarm): Payload[] { } if (entityState == 'armed' || entityState == 'triggered') { - if (page.items[0].actionArray !== undefined && page.items[0].actionArray[4] !== '') { - arm1 = page.items[0].actionArray[4]; + if (page.items[0].actionStringArray !== undefined && page.items[0].actionStringArray[4] !== '') { + arm1 = page.items[0].actionStringArray[4]; } else { arm1 = findLocale('alarm_control_panel', 'disarm'); //'Deaktivieren'; //arm1*~* } @@ -4773,30 +4776,30 @@ function GenerateAlarmPage(page: PageAlarm): Payload[] { } if (entityState == 'disarmed' || entityState == 'arming' || entityState == 'pending') { - if (page.items[0].actionArray !== undefined && page.items[0].actionArray[0] !== '') { - arm1 = page.items[0].actionArray[0]; + if (page.items[0].actionStringArray !== undefined && page.items[0].actionStringArray[0] !== '') { + arm1 = page.items[0].actionStringArray[0]; } else { - arm1 = findLocale('alarm_control_panel', 'arm_away'); //'Vollschutz' //arm1*~* + arm1 = findLocale('alarm_control_panel', 'arm_away'); //'Vollschutz' //arm1*~* } - arm1ActionName = 'A1'; //arm1ActionName*~* - if (page.items[0].actionArray !== undefined && page.items[0].actionArray[1] !== '') { - arm2 = page.items[0].actionArray[1]; + arm1ActionName = 'A1'; //arm1ActionName*~* + if (page.items[0].actionStringArray !== undefined && page.items[0].actionStringArray[1] !== '') { + arm2 = page.items[0].actionStringArray[1]; } else { - arm2 = findLocale('alarm_control_panel', 'arm_home'); //'Zuhause'; //arm2*~* + arm2 = findLocale('alarm_control_panel', 'arm_home'); //'Zuhause'; //arm2*~* } - arm2ActionName = 'A2'; //arm2ActionName*~* - if (page.items[0].actionArray !== undefined && page.items[0].actionArray[2] !== '') { - arm3 = page.items[0].actionArray[2]; + arm2ActionName = 'A2'; //arm2ActionName*~* + if (page.items[0].actionStringArray !== undefined && page.items[0].actionStringArray[2] !== '') { + arm3 = page.items[0].actionStringArray[2]; } else { - arm3 = findLocale('alarm_control_panel', 'arm_night'); //'Nacht'; //arm3*~* + arm3 = findLocale('alarm_control_panel', 'arm_night'); //'Nacht'; //arm3*~* } - arm3ActionName = 'A3'; //arm3ActionName*~* - if (page.items[0].actionArray !== undefined && page.items[0].actionArray[3] !== '') { - arm4 = page.items[0].actionArray[3]; + arm3ActionName = 'A3'; //arm3ActionName*~* + if (page.items[0].actionStringArray !== undefined && page.items[0].actionStringArray[3] !== '') { + arm4 = page.items[0].actionStringArray[3]; } else { - arm4 = findLocale('alarm_control_panel', 'arm_vacation'); //'Besuch'; //arm4*~* + arm4 = findLocale('alarm_control_panel', 'arm_vacation'); //'Besuch'; //arm4*~* } - arm4ActionName = 'A4'; //arm4ActionName*~* + arm4ActionName = 'A4'; //arm4ActionName*~* } if (Debug) { @@ -8303,7 +8306,7 @@ type PageItem = { inSel_ChoiceState: (boolean | undefined), iconArray: (string[] | undefined), fontSize: (number | undefined), - actionArray: (string[] | undefined), + actionStringArray: (string[] | undefined), } type DimMode = { From 85e6eb6f73e31952ee47cd16bb6657ddaadbe5e9 Mon Sep 17 00:00:00 2001 From: Armilar <102996011+Armilar@users.noreply.github.com> Date: Mon, 20 Nov 2023 12:49:42 +0100 Subject: [PATCH 08/17] 4.3.3.6 - Update NsPanelTs.ts --- ioBroker/NsPanelTs.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ioBroker/NsPanelTs.ts b/ioBroker/NsPanelTs.ts index 79e68f79..ae823431 100644 --- a/ioBroker/NsPanelTs.ts +++ b/ioBroker/NsPanelTs.ts @@ -272,7 +272,7 @@ const swWindy: RGB = { red: 150, green: 150, blue: 150}; "subPage": false, "items": [ { id: 'alias.0.NSPanel.Alarm', - actionStringArray: ['Vollschhutz','Zuhause','Nacht','Besuch','Ausschalten'], + actionStringArray: ['Vollschutz','Zuhause','Nacht','Besuch','Ausschalten'], autoCreateALias: true } ] } @@ -834,7 +834,7 @@ let globalTracklist: any; let weatherAdapterInstanceNumber: number = 0; let isSetOptionActive: boolean = false; -const scriptVersion: string = 'v4.3.3.5'; +const scriptVersion: string = 'v4.3.3.6'; let nodeVersion: string = ''; let javaScriptVersion: string = ''; From cbdc6f6f775ecf14f761d00fbd52521297fb4e4f Mon Sep 17 00:00:00 2001 From: Armilar Date: Mon, 20 Nov 2023 12:00:33 +0000 Subject: [PATCH 09/17] Merge pull request #1053 from tt-tom17/AlarmPage (add nextion2text) --- HMI/US/portrait/diff-filtered.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/HMI/US/portrait/diff-filtered.txt b/HMI/US/portrait/diff-filtered.txt index eae7aaba..84c58193 100644 --- a/HMI/US/portrait/diff-filtered.txt +++ b/HMI/US/portrait/diff-filtered.txt @@ -1,4 +1,4 @@ -+++ /dev/fd/62 2023-11-19 11:50:01.948444798 +0000 ++++ /dev/fd/62 2023-11-20 12:00:30.030688688 +0000 +le list + +1,9 @@ +.s.txt From acbaa43ee6ff05cd1f0859e5d901d3047f4cbdc4 Mon Sep 17 00:00:00 2001 From: Armilar <102996011+Armilar@users.noreply.github.com> Date: Mon, 20 Nov 2023 13:40:01 +0100 Subject: [PATCH 10/17] Update ioBroker_NSPanel_locales.json --- ioBroker/ioBroker_NSPanel_locales.json | 178 ++++++++++++++----------- 1 file changed, 100 insertions(+), 78 deletions(-) diff --git a/ioBroker/ioBroker_NSPanel_locales.json b/ioBroker/ioBroker_NSPanel_locales.json index aab60cd2..091f81da 100644 --- a/ioBroker/ioBroker_NSPanel_locales.json +++ b/ioBroker/ioBroker_NSPanel_locales.json @@ -2409,86 +2409,108 @@ }, "qr":{ "ssid":{ - "en-US":"SSID", - "de-DE":"SSID", - "nl-NL":"SSID", - "da-DK":"SSID", - "es-ES":"SSID", - "fr-FR":"SSID", - "it-IT":"SSID", - "ru-RU":"SSID", - "nb-NO":"SSID", - "nn-NO":"SSID", - "pl-PL":"SSID", - "pt-PT":"SSID", - "af-ZA":"SSID", - "ar-SY":"SSID", - "bg-BG":"SSID", - "ca-ES":"SSID", - "cs-CZ":"SSID", - "el-GR":"SSID", - "et-EE":"SSID", - "fa-IR":"SSID", - "fi-FI":"SSID", - "he-IL":"SSID", - "hr-xx":"SSID", - "hu-HU":"SSID", - "hy-AM":"SSID", - "id-ID":"SSID", - "is-IS":"SSID", - "lb-xx":"SSID", - "lt-LT":"SSID", - "ro-RO":"SSID", - "sk-SK":"SSID", - "sl-SI":"SSID", - "sv-SE":"SSID", - "th-TH":"SSID", - "tr-TR":"SSID", - "uk-UA":"SSID", - "vi-VN":"SSID", - "zh-CN":"SSID", - "zh-TW":"SSID" + "en-US":"SSID", + "de-DE":"SSID", + "nl-NL":"SSID", + "da-DK":"SSID", + "es-ES":"SSID", + "fr-FR":"SSID", + "it-IT":"SSID", + "ru-RU":"SSID", + "nb-NO":"SSID", + "nn-NO":"SSID", + "pl-PL":"SSID", + "pt-PT":"SSID", + "af-ZA":"SSID", + "ar-SY":"SSID", + "bg-BG":"SSID", + "ca-ES":"SSID", + "cs-CZ":"SSID", + "el-GR":"SSID", + "et-EE":"SSID", + "fa-IR":"SSID", + "fi-FI":"SSID", + "he-IL":"SSID", + "hr-xx":"SSID", + "hu-HU":"SSID", + "hy-AM":"SSID", + "id-ID":"SSID", + "is-IS":"SSID", + "lb-xx":"SSID", + "lt-LT":"SSID", + "ro-RO":"SSID", + "sk-SK":"SSID", + "sl-SI":"SSID", + "sv-SE":"SSID", + "th-TH":"SSID", + "tr-TR":"SSID", + "uk-UA":"SSID", + "vi-VN":"SSID", + "zh-CN":"SSID", + "zh-TW":"SSID" }, "password":{ - "en-US":"Password", - "de-DE":"Passwort", - "nl-NL":"Wachtwoord", - "da-DK":"Adgangskode", - "es-ES":"Contraseña", - "fr-FR":"Mot de passe", - "it-IT":"Parola d'ordine", - "ru-RU":"Пароль", - "nb-NO":"Passord", - "nn-NO":"Passord", - "pl-PL":"Hasło", - "pt-PT":"Senha", - "af-ZA":"Wagwoord", - "ar-SY":"كلمة المرور", - "bg-BG":"Парола", - "ca-ES":"Contrasenya", - "cs-CZ":"Heslo", - "el-GR":"Κωδικός πρόσβασης", - "et-EE":"Parool", - "fa-IR":"کلمه عبور", - "fi-FI":"Salasana", - "he-IL":"סיסמה", - "hr-xx":"Lozinka", - "hu-HU":"Jelszó", - "hy-AM":"Գաղտնաբառ", - "id-ID":"Kata sandi", - "is-IS":"Lykilorð", - "lb-xx":"Passwuert", - "lt-LT":"Slaptažodis", - "ro-RO":"Parola", - "sk-SK":"heslo", - "sl-SI":"Geslo", - "sv-SE":"Lösenord", - "th-TH":"รหัสผ่าน", - "tr-TR":"Şifre", - "uk-UA":"Пароль", - "vi-VN":"Mật khẩu", - "zh-CN":"密码", - "zh-TW":"密碼" + "en-US":"Password", + "de-DE":"Passwort", + "nl-NL":"Wachtwoord", + "da-DK":"Adgangskode", + "es-ES":"Contraseña", + "fr-FR":"Mot de passe", + "it-IT":"Parola d'ordine", + "ru-RU":"Пароль", + "nb-NO":"Passord", + "nn-NO":"Passord", + "pl-PL":"Hasło", + "pt-PT":"Senha", + "af-ZA":"Wagwoord", + "ar-SY":"كلمة المرور", + "bg-BG":"Парола", + "ca-ES":"Contrasenya", + "cs-CZ":"Heslo", + "el-GR":"Κωδικός πρόσβασης", + "et-EE":"Parool", + "fa-IR":"کلمه عبور", + "fi-FI":"Salasana", + "he-IL":"סיסמה", + "hr-xx":"Lozinka", + "hu-HU":"Jelszó", + "hy-AM":"Գաղտնաբառ", + "id-ID":"Kata sandi", + "is-IS":"Lykilorð", + "lb-xx":"Passwuert", + "lt-LT":"Slaptažodis", + "ro-RO":"Parola", + "sk-SK":"heslo", + "sl-SI":"Geslo", + "sv-SE":"Lösenord", + "th-TH":"รหัสผ่าน", + "tr-TR":"Şifre", + "uk-UA":"Пароль", + "vi-VN":"Mật khẩu", + "zh-CN":"密码", + "zh-TW":"密碼" + } + }, + "media":{ + "no_music_to_control":{ + "en-US":"No music to control", + "de-DE":"Keine Musik zum Steuern" + }, + "speaker":{ + "en-US":"Equalizer", + "de-DE":"Equalizer" + }, + "playlist":{ + "en-US":"Playlist", + "de-DE":"Playlist" + }, + "tracklist":{ + "en-US":"Tracks", + "de-DE":"Titel" + }, + "equalizer":{ + "en-US":"Equalizer", + "de-DE":"Equalizer" } } } From c961cf9fde7b5f44f7d2820c7b0404cdb9a4ecc8 Mon Sep 17 00:00:00 2001 From: Armilar <102996011+Armilar@users.noreply.github.com> Date: Mon, 20 Nov 2023 13:40:25 +0100 Subject: [PATCH 11/17] Update ioBroker_NSPanel_locales_beta.json --- ioBroker/ioBroker_NSPanel_locales_beta.json | 178 +++++++++++--------- 1 file changed, 100 insertions(+), 78 deletions(-) diff --git a/ioBroker/ioBroker_NSPanel_locales_beta.json b/ioBroker/ioBroker_NSPanel_locales_beta.json index aab60cd2..091f81da 100644 --- a/ioBroker/ioBroker_NSPanel_locales_beta.json +++ b/ioBroker/ioBroker_NSPanel_locales_beta.json @@ -2409,86 +2409,108 @@ }, "qr":{ "ssid":{ - "en-US":"SSID", - "de-DE":"SSID", - "nl-NL":"SSID", - "da-DK":"SSID", - "es-ES":"SSID", - "fr-FR":"SSID", - "it-IT":"SSID", - "ru-RU":"SSID", - "nb-NO":"SSID", - "nn-NO":"SSID", - "pl-PL":"SSID", - "pt-PT":"SSID", - "af-ZA":"SSID", - "ar-SY":"SSID", - "bg-BG":"SSID", - "ca-ES":"SSID", - "cs-CZ":"SSID", - "el-GR":"SSID", - "et-EE":"SSID", - "fa-IR":"SSID", - "fi-FI":"SSID", - "he-IL":"SSID", - "hr-xx":"SSID", - "hu-HU":"SSID", - "hy-AM":"SSID", - "id-ID":"SSID", - "is-IS":"SSID", - "lb-xx":"SSID", - "lt-LT":"SSID", - "ro-RO":"SSID", - "sk-SK":"SSID", - "sl-SI":"SSID", - "sv-SE":"SSID", - "th-TH":"SSID", - "tr-TR":"SSID", - "uk-UA":"SSID", - "vi-VN":"SSID", - "zh-CN":"SSID", - "zh-TW":"SSID" + "en-US":"SSID", + "de-DE":"SSID", + "nl-NL":"SSID", + "da-DK":"SSID", + "es-ES":"SSID", + "fr-FR":"SSID", + "it-IT":"SSID", + "ru-RU":"SSID", + "nb-NO":"SSID", + "nn-NO":"SSID", + "pl-PL":"SSID", + "pt-PT":"SSID", + "af-ZA":"SSID", + "ar-SY":"SSID", + "bg-BG":"SSID", + "ca-ES":"SSID", + "cs-CZ":"SSID", + "el-GR":"SSID", + "et-EE":"SSID", + "fa-IR":"SSID", + "fi-FI":"SSID", + "he-IL":"SSID", + "hr-xx":"SSID", + "hu-HU":"SSID", + "hy-AM":"SSID", + "id-ID":"SSID", + "is-IS":"SSID", + "lb-xx":"SSID", + "lt-LT":"SSID", + "ro-RO":"SSID", + "sk-SK":"SSID", + "sl-SI":"SSID", + "sv-SE":"SSID", + "th-TH":"SSID", + "tr-TR":"SSID", + "uk-UA":"SSID", + "vi-VN":"SSID", + "zh-CN":"SSID", + "zh-TW":"SSID" }, "password":{ - "en-US":"Password", - "de-DE":"Passwort", - "nl-NL":"Wachtwoord", - "da-DK":"Adgangskode", - "es-ES":"Contraseña", - "fr-FR":"Mot de passe", - "it-IT":"Parola d'ordine", - "ru-RU":"Пароль", - "nb-NO":"Passord", - "nn-NO":"Passord", - "pl-PL":"Hasło", - "pt-PT":"Senha", - "af-ZA":"Wagwoord", - "ar-SY":"كلمة المرور", - "bg-BG":"Парола", - "ca-ES":"Contrasenya", - "cs-CZ":"Heslo", - "el-GR":"Κωδικός πρόσβασης", - "et-EE":"Parool", - "fa-IR":"کلمه عبور", - "fi-FI":"Salasana", - "he-IL":"סיסמה", - "hr-xx":"Lozinka", - "hu-HU":"Jelszó", - "hy-AM":"Գաղտնաբառ", - "id-ID":"Kata sandi", - "is-IS":"Lykilorð", - "lb-xx":"Passwuert", - "lt-LT":"Slaptažodis", - "ro-RO":"Parola", - "sk-SK":"heslo", - "sl-SI":"Geslo", - "sv-SE":"Lösenord", - "th-TH":"รหัสผ่าน", - "tr-TR":"Şifre", - "uk-UA":"Пароль", - "vi-VN":"Mật khẩu", - "zh-CN":"密码", - "zh-TW":"密碼" + "en-US":"Password", + "de-DE":"Passwort", + "nl-NL":"Wachtwoord", + "da-DK":"Adgangskode", + "es-ES":"Contraseña", + "fr-FR":"Mot de passe", + "it-IT":"Parola d'ordine", + "ru-RU":"Пароль", + "nb-NO":"Passord", + "nn-NO":"Passord", + "pl-PL":"Hasło", + "pt-PT":"Senha", + "af-ZA":"Wagwoord", + "ar-SY":"كلمة المرور", + "bg-BG":"Парола", + "ca-ES":"Contrasenya", + "cs-CZ":"Heslo", + "el-GR":"Κωδικός πρόσβασης", + "et-EE":"Parool", + "fa-IR":"کلمه عبور", + "fi-FI":"Salasana", + "he-IL":"סיסמה", + "hr-xx":"Lozinka", + "hu-HU":"Jelszó", + "hy-AM":"Գաղտնաբառ", + "id-ID":"Kata sandi", + "is-IS":"Lykilorð", + "lb-xx":"Passwuert", + "lt-LT":"Slaptažodis", + "ro-RO":"Parola", + "sk-SK":"heslo", + "sl-SI":"Geslo", + "sv-SE":"Lösenord", + "th-TH":"รหัสผ่าน", + "tr-TR":"Şifre", + "uk-UA":"Пароль", + "vi-VN":"Mật khẩu", + "zh-CN":"密码", + "zh-TW":"密碼" + } + }, + "media":{ + "no_music_to_control":{ + "en-US":"No music to control", + "de-DE":"Keine Musik zum Steuern" + }, + "speaker":{ + "en-US":"Equalizer", + "de-DE":"Equalizer" + }, + "playlist":{ + "en-US":"Playlist", + "de-DE":"Playlist" + }, + "tracklist":{ + "en-US":"Tracks", + "de-DE":"Titel" + }, + "equalizer":{ + "en-US":"Equalizer", + "de-DE":"Equalizer" } } } From 1a7c9abb161ccfad7b52cdd857081e17b2c201ed Mon Sep 17 00:00:00 2001 From: Armilar <102996011+Armilar@users.noreply.github.com> Date: Mon, 20 Nov 2023 13:41:51 +0100 Subject: [PATCH 12/17] Update ioBroker_NSPanel_locales_beta.json --- ioBroker/ioBroker_NSPanel_locales_beta.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ioBroker/ioBroker_NSPanel_locales_beta.json b/ioBroker/ioBroker_NSPanel_locales_beta.json index 091f81da..b7fa6bb6 100644 --- a/ioBroker/ioBroker_NSPanel_locales_beta.json +++ b/ioBroker/ioBroker_NSPanel_locales_beta.json @@ -2497,8 +2497,8 @@ "de-DE":"Keine Musik zum Steuern" }, "speaker":{ - "en-US":"Equalizer", - "de-DE":"Equalizer" + "en-US":"Speaker", + "de-DE":"Lautsprecher" }, "playlist":{ "en-US":"Playlist", From f86768c95baadc538151db7102b7221cf29d85c5 Mon Sep 17 00:00:00 2001 From: Armilar <102996011+Armilar@users.noreply.github.com> Date: Mon, 20 Nov 2023 13:42:12 +0100 Subject: [PATCH 13/17] Update ioBroker_NSPanel_locales.json --- ioBroker/ioBroker_NSPanel_locales.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ioBroker/ioBroker_NSPanel_locales.json b/ioBroker/ioBroker_NSPanel_locales.json index 091f81da..b7fa6bb6 100644 --- a/ioBroker/ioBroker_NSPanel_locales.json +++ b/ioBroker/ioBroker_NSPanel_locales.json @@ -2497,8 +2497,8 @@ "de-DE":"Keine Musik zum Steuern" }, "speaker":{ - "en-US":"Equalizer", - "de-DE":"Equalizer" + "en-US":"Speaker", + "de-DE":"Lautsprecher" }, "playlist":{ "en-US":"Playlist", From 03f65daef375de27a6ded5baac8e3977920d612c Mon Sep 17 00:00:00 2001 From: Armilar <102996011+Armilar@users.noreply.github.com> Date: Mon, 20 Nov 2023 13:51:35 +0100 Subject: [PATCH 14/17] Update ioBroker_NSPanel_locales.json --- ioBroker/ioBroker_NSPanel_locales.json | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/ioBroker/ioBroker_NSPanel_locales.json b/ioBroker/ioBroker_NSPanel_locales.json index b7fa6bb6..420bff2a 100644 --- a/ioBroker/ioBroker_NSPanel_locales.json +++ b/ioBroker/ioBroker_NSPanel_locales.json @@ -2497,8 +2497,8 @@ "de-DE":"Keine Musik zum Steuern" }, "speaker":{ - "en-US":"Speaker", - "de-DE":"Lautsprecher" + "en-US":"Equalizer", + "de-DE":"Equalizer" }, "playlist":{ "en-US":"Playlist", @@ -2511,6 +2511,10 @@ "equalizer":{ "en-US":"Equalizer", "de-DE":"Equalizer" + }, + "no_speaker_found":{ + "en-US":"No Speaker found", + "de-DE":"Kein Latsprecher gefunden" } } } From 99d013c0390844686e36ea309cfe1f81cda6e1fb Mon Sep 17 00:00:00 2001 From: Armilar <102996011+Armilar@users.noreply.github.com> Date: Mon, 20 Nov 2023 13:59:42 +0100 Subject: [PATCH 15/17] Update ioBroker_NSPanel_locales.json --- ioBroker/ioBroker_NSPanel_locales.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ioBroker/ioBroker_NSPanel_locales.json b/ioBroker/ioBroker_NSPanel_locales.json index 420bff2a..f2c5a219 100644 --- a/ioBroker/ioBroker_NSPanel_locales.json +++ b/ioBroker/ioBroker_NSPanel_locales.json @@ -2497,16 +2497,16 @@ "de-DE":"Keine Musik zum Steuern" }, "speaker":{ - "en-US":"Equalizer", - "de-DE":"Equalizer" + "en-US":"Speakerlist", + "de-DE":"Wiedergabegeräte" }, "playlist":{ "en-US":"Playlist", "de-DE":"Playlist" }, "tracklist":{ - "en-US":"Tracks", - "de-DE":"Titel" + "en-US":"Tracklist", + "de-DE":"Titelliste" }, "equalizer":{ "en-US":"Equalizer", From 6245a8e12ff544b35938c66a0f0321aafb58d413 Mon Sep 17 00:00:00 2001 From: Armilar <102996011+Armilar@users.noreply.github.com> Date: Mon, 20 Nov 2023 14:18:57 +0100 Subject: [PATCH 17/17] v4.3.3.7 - Update NsPanelTs.ts --- ioBroker/NsPanelTs.ts | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/ioBroker/NsPanelTs.ts b/ioBroker/NsPanelTs.ts index ae823431..ba94221b 100644 --- a/ioBroker/NsPanelTs.ts +++ b/ioBroker/NsPanelTs.ts @@ -1,5 +1,5 @@ /*----------------------------------------------------------------------- -TypeScript v4.3.3.6 zur Steuerung des SONOFF NSPanel mit dem ioBroker by @Armilar / @TT-Tom / @Sternmiere / @Britzelpuf / @ravenS0ne +TypeScript v4.3.3.7 zur Steuerung des SONOFF NSPanel mit dem ioBroker by @Armilar / @TT-Tom / @Sternmiere / @Britzelpuf / @ravenS0ne - abgestimmt auf TFT 53 / v4.3.3 / BerryDriver 9 / Tasmota 13.2.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 @@ -56,7 +56,8 @@ ReleaseNotes: - 17.11.2023 - v4.3.3.5 Add Multilingualism to cardQR, popupFan, popupTimer (39 languages) - 18.11.2023 - v4.3.3.6 Add autoCreateALias to PageAlarm - 20.11.2023 - v4.3.3.6 Add actionStringArray to PageAlarm - + - 20.11.2023 - v4.3.3.6 Add Add Multilingualism to cardAlarm (39 languages) + - 20.11.2023 - v4.3.3.7 Add Add Multilingualism to cardMedia (39 languages) Todo: - XX.XX.XXXX - v4.4.0 Change the bottomScreensaverEntity (rolling) if more than 6 entries are defined @@ -834,7 +835,7 @@ let globalTracklist: any; let weatherAdapterInstanceNumber: number = 0; let isSetOptionActive: boolean = false; -const scriptVersion: string = 'v4.3.3.6'; +const scriptVersion: string = 'v4.3.3.7'; let nodeVersion: string = ''; let javaScriptVersion: string = ''; @@ -4388,7 +4389,7 @@ function GenerateMediaPage(page: PageMedia): Payload[] { author = getState(id + '.ARTIST').val; } if ((getState(id + '.ARTIST').val).length == 0) { - author = 'no music to control'; + author = findLocale('media','no_music_to_control'); } } @@ -4402,7 +4403,7 @@ function GenerateMediaPage(page: PageMedia): Payload[] { } author = getState(id + '.ARTIST').val + ' | ' + getState(id + '.ALBUM').val; if ((getState(id + '.ARTIST').val).length == 0) { - author = 'no music to control'; + author = findLocale('media','no_music_to_control'); } } @@ -4435,7 +4436,7 @@ function GenerateMediaPage(page: PageMedia): Payload[] { author = getState(id + '.ARTIST').val; } if ((getState(id + '.ARTIST').val).length == 0) { - author = 'no music to control'; + author = findLocale('media','no_music_to_control'); } } @@ -4485,7 +4486,7 @@ function GenerateMediaPage(page: PageMedia): Payload[] { } } - let currentSpeaker = 'kein Speaker gefunden'; + let currentSpeaker = findLocale('media','no_speaker_found'); if (v2Adapter == 'alexa2') { currentSpeaker = getState(([page.items[0].adapterPlayerInstance, 'Echo-Devices.', page.items[0].mediaDevice, '.Info.name'].join(''))).val; @@ -4539,7 +4540,7 @@ function GenerateMediaPage(page: PageMedia): Payload[] { id + '?speakerlist' + '~' + Icons.GetIcon('speaker') + '~' + speakerListIconCol + '~' + - 'Speaker' + '~' + + findLocale('media','speaker') + '~' + 'media0~' } @@ -4567,7 +4568,8 @@ function GenerateMediaPage(page: PageMedia): Payload[] { id + '?playlist' + '~' + Icons.GetIcon('playlist-play') + '~' + playListIconCol + '~' + - 'PlayL ' + page.heading + '~' + + //'PlayL ' + page.heading + '~' + + findLocale('media','playlist') + '~' + 'media1~' } @@ -4600,7 +4602,7 @@ function GenerateMediaPage(page: PageMedia): Payload[] { id + '?tracklist' + '~' + Icons.GetIcon('animation-play-outline') + '~' + trackListIconCol + '~' + - 'Tracklist' + '~' + + findLocale('media','tracklist') + '~' + + '~' + 'media2~' } @@ -4613,7 +4615,7 @@ function GenerateMediaPage(page: PageMedia): Payload[] { id + '?equalizer' + '~' + Icons.GetIcon('equalizer-outline') + '~' + equalizerListIconCol + '~' + - 'Equalizer' + '~' + + findLocale('media','equalizer') + '~' + + '~' + 'media3~' }