mirror of
https://github.com/joBr99/nspanel-lovelace-ui.git
synced 2025-12-20 14:37:01 +01:00
v4.3.3.26 - Downgrade NsPanelTs.ts
Bug with inSel-Popup in v4.3.3.27
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
/*-----------------------------------------------------------------------
|
/*-----------------------------------------------------------------------
|
||||||
TypeScript v4.3.3.27 zur Steuerung des SONOFF NSPanel mit dem ioBroker by @Armilar / @TT-Tom / @Sternmiere / @Britzelpuf / @ravenS0ne
|
TypeScript v4.3.3.26 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.3.0
|
- abgestimmt auf TFT 53 / v4.3.3 / BerryDriver 9 / Tasmota 13.3.0
|
||||||
@joBr99 Projekt: https://github.com/joBr99/nspanel-lovelace-ui/tree/main/ioBroker
|
@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
|
NsPanelTs.ts (dieses TypeScript in ioBroker) Stable: https://github.com/joBr99/nspanel-lovelace-ui/blob/main/ioBroker/NsPanelTs.ts
|
||||||
@@ -83,8 +83,6 @@ ReleaseNotes:
|
|||||||
- 18.12.2023 - v4.3.3.24 Hotfix Update Message / Add Icon Colors to Entity Button
|
- 18.12.2023 - v4.3.3.24 Hotfix Update Message / Add Icon Colors to Entity Button
|
||||||
- 21.12.2023 - v4.3.3.25 Add switch of cardQR by hidePassword: true
|
- 21.12.2023 - v4.3.3.25 Add switch of cardQR by hidePassword: true
|
||||||
- 26.12.2023 - v4.3.3.26 Fix Log output payload -> Json.stringify
|
- 26.12.2023 - v4.3.3.26 Fix Log output payload -> Json.stringify
|
||||||
- 28.12.2023 - v4.3.3.27 Fix Payload (pageItem.id -> placeId) by Function CreateEntity
|
|
||||||
- 28.12.2023 - v4.3.3.27 Fix Fallback PageItem.name by Function CreateEntity
|
|
||||||
|
|
||||||
Todo:
|
Todo:
|
||||||
- XX.XX.XXXX - v5.0.0 Change the bottomScreensaverEntity (rolling) if more than 6 entries are defined
|
- XX.XX.XXXX - v5.0.0 Change the bottomScreensaverEntity (rolling) if more than 6 entries are defined
|
||||||
@@ -961,7 +959,7 @@ export const config = <Config> {
|
|||||||
// _________________________________ DE: Ab hier keine Konfiguration mehr _____________________________________
|
// _________________________________ DE: Ab hier keine Konfiguration mehr _____________________________________
|
||||||
// _________________________________ EN: No more configuration from here _____________________________________
|
// _________________________________ EN: No more configuration from here _____________________________________
|
||||||
|
|
||||||
const scriptVersion: string = 'v4.3.3.27';
|
const scriptVersion: string = 'v4.3.3.26';
|
||||||
const tft_version: string = 'v4.3.3';
|
const tft_version: string = 'v4.3.3';
|
||||||
const desired_display_firmware_version = 53;
|
const desired_display_firmware_version = 53;
|
||||||
const berry_driver_version = 9;
|
const berry_driver_version = 9;
|
||||||
@@ -3235,7 +3233,7 @@ function GeneratePageElements(page: Page): string {
|
|||||||
|
|
||||||
for (let index = 0; index < maxItems; index++) {
|
for (let index = 0; index < maxItems; index++) {
|
||||||
if (page.items[index] !== undefined) {
|
if (page.items[index] !== undefined) {
|
||||||
pageData += CreateEntity(page.items[index], index, page.useColor);
|
pageData += CreateEntity(page.items[index], index + 1, page.useColor);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (Debug) log('GeneratePageElements pageData ' + pageData, 'info');
|
if (Debug) log('GeneratePageElements pageData ' + pageData, 'info');
|
||||||
@@ -3281,26 +3279,16 @@ function CreateEntity(pageItem: PageItem, placeId: number, useColors: boolean =
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Fallback if no name is given
|
// Fallback if no name is given
|
||||||
// name = pageItem.name !== undefined ? pageItem.name : o.common.name.de;
|
name = pageItem.name !== undefined ? pageItem.name : o.common.name.de;
|
||||||
name = pageItem.name !== undefined ? pageItem.name : o.common.name.de == undefined ? o.common.name : o.common.name.de;
|
|
||||||
let prefix = pageItem.prefixName !== undefined ? pageItem.prefixName : '';
|
let prefix = pageItem.prefixName !== undefined ? pageItem.prefixName : '';
|
||||||
let suffix = pageItem.suffixName !== undefined ? pageItem.suffixName : '';
|
let suffix = pageItem.suffixName !== undefined ? pageItem.suffixName : '';
|
||||||
|
|
||||||
// If name is used with changing values
|
// If name is used with changing values
|
||||||
if ((name || '').indexOf('getState(') != -1) {
|
|
||||||
let dpName: string = name.slice(10, name.length -6);
|
|
||||||
name = getState(dpName).val;
|
|
||||||
RegisterEntityWatcher(dpName);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
// If name is used with changing values
|
|
||||||
if (name.indexOf('getState(') != -1) {
|
if (name.indexOf('getState(') != -1) {
|
||||||
let dpName: string = name.slice(10, name.length -6);
|
let dpName: string = name.slice(10, name.length -6);
|
||||||
name = getState(dpName).val;
|
name = getState(dpName).val;
|
||||||
RegisterEntityWatcher(dpName);
|
RegisterEntityWatcher(dpName);
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
name = prefix + name + suffix;
|
name = prefix + name + suffix;
|
||||||
|
|
||||||
if (existsState(pageItem.id + '.GET')) {
|
if (existsState(pageItem.id + '.GET')) {
|
||||||
@@ -3555,8 +3543,8 @@ function CreateEntity(pageItem: PageItem, placeId: number, useColors: boolean =
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Debug) log('CreateEntity Icon role socket/light ~' + type + '~' + placeId + '~' + iconId + '~' + iconColor + '~' + name + '~' + optVal, 'info');
|
if (Debug) log('CreateEntity Icon role socket/light ~' + type + '~' + pageItem.id + '~' + iconId + '~' + iconColor + '~' + name + '~' + optVal, 'info');
|
||||||
return '~' + type + '~' + placeId + '~' + iconId + '~' + iconColor + '~' + name + '~' + optVal;
|
return '~' + type + '~' + pageItem.id + '~' + iconId + '~' + iconColor + '~' + name + '~' + optVal;
|
||||||
|
|
||||||
case 'hue':
|
case 'hue':
|
||||||
type = 'light';
|
type = 'light';
|
||||||
@@ -3585,8 +3573,8 @@ function CreateEntity(pageItem: PageItem, placeId: number, useColors: boolean =
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Debug) log('CreateEntity Icon role hue ~' + type + '~' + placeId + '~' + iconId + '~' + iconColor + '~' + name + '~' + optVal, 'info');
|
if (Debug) log('CreateEntity Icon role hue ~' + type + '~' + pageItem.id + '~' + iconId + '~' + iconColor + '~' + name + '~' + optVal, 'info');
|
||||||
return '~' + type + '~' + placeId + '~' + iconId + '~' + iconColor + '~' + name + '~' + optVal;
|
return '~' + type + '~' + pageItem.id + '~' + iconId + '~' + iconColor + '~' + name + '~' + optVal;
|
||||||
|
|
||||||
case 'ct':
|
case 'ct':
|
||||||
type = 'light';
|
type = 'light';
|
||||||
@@ -3605,8 +3593,8 @@ function CreateEntity(pageItem: PageItem, placeId: number, useColors: boolean =
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Debug) log('CreateEntity Icon role ct ~' + type + '~' + placeId + '~' + iconId + '~' + iconColor + '~' + name + '~' + optVal, 'info');
|
if (Debug) log('CreateEntity Icon role ct ~' + type + '~' + pageItem.id + '~' + iconId + '~' + iconColor + '~' + name + '~' + optVal, 'info');
|
||||||
return '~' + type + '~' + placeId + '~' + iconId + '~' + iconColor + '~' + name + '~' + optVal;
|
return '~' + type + '~' + pageItem.id + '~' + iconId + '~' + iconColor + '~' + name + '~' + optVal;
|
||||||
|
|
||||||
case 'rgb':
|
case 'rgb':
|
||||||
type = 'light';
|
type = 'light';
|
||||||
@@ -3635,8 +3623,8 @@ function CreateEntity(pageItem: PageItem, placeId: number, useColors: boolean =
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Debug) log('CreateEntity Icon role rgb ~' + type + '~' + placeId + '~' + iconId + '~' + iconColor + '~' + name + '~' + optVal, 'info');
|
if (Debug) log('CreateEntity Icon role rgb ~' + type + '~' + pageItem.id + '~' + iconId + '~' + iconColor + '~' + name + '~' + optVal, 'info');
|
||||||
return '~' + type + '~' + placeId + '~' + iconId + '~' + iconColor + '~' + name + '~' + optVal;
|
return '~' + type + '~' + pageItem.id + '~' + iconId + '~' + iconColor + '~' + name + '~' + optVal;
|
||||||
|
|
||||||
case 'cie':
|
case 'cie':
|
||||||
case 'rgbSingle':
|
case 'rgbSingle':
|
||||||
@@ -3667,8 +3655,8 @@ function CreateEntity(pageItem: PageItem, placeId: number, useColors: boolean =
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Debug) log('CreateEntity Icon role cie/rgbSingle ~' + type + '~' + placeId + '~' + iconId + '~' + iconColor + '~' + name + '~' + optVal, 'info');
|
if (Debug) log('CreateEntity Icon role cie/rgbSingle ~' + type + '~' + pageItem.id + '~' + iconId + '~' + iconColor + '~' + name + '~' + optVal, 'info');
|
||||||
return '~' + type + '~' + placeId + '~' + iconId + '~' + iconColor + '~' + name + '~' + optVal;
|
return '~' + type + '~' + pageItem.id + '~' + iconId + '~' + iconColor + '~' + name + '~' + optVal;
|
||||||
|
|
||||||
case 'dimmer':
|
case 'dimmer':
|
||||||
type = 'light';
|
type = 'light';
|
||||||
@@ -3687,8 +3675,8 @@ function CreateEntity(pageItem: PageItem, placeId: number, useColors: boolean =
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Debug) log('CreateEntity Icon role dimmer ~' + type + '~' + placeId + '~' + iconId + '~' + iconColor + '~' + name + '~' + optVal, 'info');
|
if (Debug) log('CreateEntity Icon role dimmer ~' + type + '~' + pageItem.id + '~' + iconId + '~' + iconColor + '~' + name + '~' + optVal, 'info');
|
||||||
return '~' + type + '~' + placeId + '~' + iconId + '~' + iconColor + '~' + name + '~' + optVal;
|
return '~' + type + '~' + pageItem.id + '~' + iconId + '~' + iconColor + '~' + name + '~' + optVal;
|
||||||
|
|
||||||
case 'blind':
|
case 'blind':
|
||||||
type = 'shutter';
|
type = 'shutter';
|
||||||
@@ -3720,9 +3708,9 @@ function CreateEntity(pageItem: PageItem, placeId: number, useColors: boolean =
|
|||||||
let icon_down_status = tempVal === max_Level ? 'disable' : 'enable';
|
let icon_down_status = tempVal === max_Level ? 'disable' : 'enable';
|
||||||
let value = icon_up + '|' + icon_stop + '|' + icon_down + '|' + icon_up_status + '|' + icon_stop_status + '|' + icon_down_status
|
let value = icon_up + '|' + icon_stop + '|' + icon_down + '|' + icon_up_status + '|' + icon_stop_status + '|' + icon_down_status
|
||||||
|
|
||||||
if (Debug) log('CreateEntity Icon role blind ~' + type + '~' + placeId + '~' + iconId + '~' + iconColor + '~' + name + '~' + value, 'info');
|
if (Debug) log('CreateEntity Icon role blind ~' + type + '~' + pageItem.id + '~' + iconId + '~' + iconColor + '~' + name + '~' + value, 'info');
|
||||||
|
|
||||||
return '~' + type + '~' + placeId + '~' + iconId + '~' + iconColor + '~' + name + '~' + value;
|
return '~' + type + '~' + pageItem.id + '~' + iconId + '~' + iconColor + '~' + name + '~' + value;
|
||||||
|
|
||||||
case 'gate':
|
case 'gate':
|
||||||
type = 'text';
|
type = 'text';
|
||||||
@@ -3742,8 +3730,8 @@ function CreateEntity(pageItem: PageItem, placeId: number, useColors: boolean =
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Debug) log('CreateEntity Icon role gate ~' + type + '~' + placeId + '~' + iconId + '~' + iconColor + '~' + name + '~' + gateState, 'info');
|
if (Debug) log('CreateEntity Icon role gate ~' + type + '~' + pageItem.id + '~' + iconId + '~' + iconColor + '~' + name + '~' + gateState, 'info');
|
||||||
return '~' + type + '~' + placeId + '~' + iconId + '~' + iconColor + '~' + name + '~' + gateState;
|
return '~' + type + '~' + pageItem.id + '~' + iconId + '~' + iconColor + '~' + name + '~' + gateState;
|
||||||
|
|
||||||
case 'door':
|
case 'door':
|
||||||
case 'window':
|
case 'window':
|
||||||
@@ -3763,8 +3751,8 @@ function CreateEntity(pageItem: PageItem, placeId: number, useColors: boolean =
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Debug) log('CreateEntity Icon role door/window ~' + type + '~' + placeId + '~' + iconId + '~' + iconColor + '~' + name + '~' + windowState, 'info');
|
if (Debug) log('CreateEntity Icon role door/window ~' + type + '~' + pageItem.id + '~' + iconId + '~' + iconColor + '~' + name + '~' + windowState, 'info');
|
||||||
return '~' + type + '~' + placeId + '~' + iconId + '~' + iconColor + '~' + name + '~' + windowState;
|
return '~' + type + '~' + pageItem.id + '~' + iconId + '~' + iconColor + '~' + name + '~' + windowState;
|
||||||
|
|
||||||
case 'motion':
|
case 'motion':
|
||||||
type = 'text';
|
type = 'text';
|
||||||
@@ -3778,8 +3766,8 @@ function CreateEntity(pageItem: PageItem, placeId: number, useColors: boolean =
|
|||||||
iconId = pageItem.icon2 !== undefined ? Icons.GetIcon(pageItem.icon2) : Icons.GetIcon('motion-sensor');
|
iconId = pageItem.icon2 !== undefined ? Icons.GetIcon(pageItem.icon2) : Icons.GetIcon('motion-sensor');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Debug) log('CreateEntity Icon role motion ~' + type + '~' + placeId + '~' + iconId + '~' + iconColor + '~' + name + '~' + optVal, 'info');
|
if (Debug) log('CreateEntity Icon role motion ~' + type + '~' + pageItem.id + '~' + iconId + '~' + iconColor + '~' + name + '~' + optVal, 'info');
|
||||||
return '~' + type + '~' + placeId + '~' + iconId + '~' + iconColor + '~' + name + '~' + optVal;
|
return '~' + type + '~' + pageItem.id + '~' + iconId + '~' + iconColor + '~' + name + '~' + optVal;
|
||||||
|
|
||||||
case 'info':
|
case 'info':
|
||||||
|
|
||||||
@@ -3853,8 +3841,8 @@ function CreateEntity(pageItem: PageItem, placeId: number, useColors: boolean =
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (Debug) log('CreateEntity Icon role info, humidity, temperature, value.temperature, value.humidity, sensor.door, sensor.window, thermostat', 'info');
|
if (Debug) log('CreateEntity Icon role info, humidity, temperature, value.temperature, value.humidity, sensor.door, sensor.window, thermostat', 'info');
|
||||||
if (Debug) log('CreateEntity ~' + type + '~' + placeId + '~' + iconId + '~' + iconColor + '~' + name + '~' + optVal+ ' ' + unit, 'info');
|
if (Debug) log('CreateEntity ~' + type + '~' + pageItem.id + '~' + iconId + '~' + iconColor + '~' + name + '~' + optVal+ ' ' + unit, 'info');
|
||||||
return '~' + type + '~' + placeId + '~' + iconId + '~' + iconColor + '~' + name + '~' + optVal + ' ' + unit;
|
return '~' + type + '~' + pageItem.id + '~' + iconId + '~' + iconColor + '~' + name + '~' + optVal + ' ' + unit;
|
||||||
|
|
||||||
case 'buttonSensor':
|
case 'buttonSensor':
|
||||||
|
|
||||||
@@ -3863,8 +3851,8 @@ function CreateEntity(pageItem: PageItem, placeId: number, useColors: boolean =
|
|||||||
iconColor = GetIconColor(pageItem, true, useColors);
|
iconColor = GetIconColor(pageItem, true, useColors);
|
||||||
let inSelText = pageItem.buttonText !== undefined ? pageItem.buttonText : 'PRESS';
|
let inSelText = pageItem.buttonText !== undefined ? pageItem.buttonText : 'PRESS';
|
||||||
|
|
||||||
if (Debug) log('CreateEntity Icon role buttonSensor ~' + type + '~' + placeId + '~' + iconId + '~' + iconColor + '~' + name + '~' + inSelText, 'info');
|
if (Debug) log('CreateEntity Icon role buttonSensor ~' + type + '~' + pageItem.id + '~' + iconId + '~' + iconColor + '~' + name + '~' + inSelText, 'info');
|
||||||
return '~' + type + '~' + placeId + '~' + iconId + '~' + iconColor + '~' + name + '~' + inSelText;
|
return '~' + type + '~' + pageItem.id + '~' + iconId + '~' + iconColor + '~' + name + '~' + inSelText;
|
||||||
|
|
||||||
case 'button':
|
case 'button':
|
||||||
type = 'button';
|
type = 'button';
|
||||||
@@ -3877,8 +3865,8 @@ function CreateEntity(pageItem: PageItem, placeId: number, useColors: boolean =
|
|||||||
|
|
||||||
let buttonText = pageItem.buttonText !== undefined ? pageItem.buttonText : 'PRESS';
|
let buttonText = pageItem.buttonText !== undefined ? pageItem.buttonText : 'PRESS';
|
||||||
|
|
||||||
if (Debug) log('CreateEntity Icon role button ~' + type + '~' + placeId + '~' + iconId + '~' + iconColor + '~' + name + '~' + buttonText, 'info');
|
if (Debug) log('CreateEntity Icon role button ~' + type + '~' + pageItem.id + '~' + iconId + '~' + iconColor + '~' + name + '~' + buttonText, 'info');
|
||||||
return '~' + type + '~' + placeId + '~' + iconId + '~' + iconColor + '~' + name + '~' + buttonText;
|
return '~' + type + '~' + pageItem.id + '~' + iconId + '~' + iconColor + '~' + name + '~' + buttonText;
|
||||||
case 'value.time':
|
case 'value.time':
|
||||||
case 'level.timer':
|
case 'level.timer':
|
||||||
type = 'timer';
|
type = 'timer';
|
||||||
@@ -3891,8 +3879,8 @@ function CreateEntity(pageItem: PageItem, placeId: number, useColors: boolean =
|
|||||||
RegisterEntityWatcher(pageItem.id + '.STATE');
|
RegisterEntityWatcher(pageItem.id + '.STATE');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Debug) log('CreateEntity Icon role level.timer ~' + type + '~' + placeId + '~' + iconId + '~' + iconColor + '~' + name + '~' + timerText, 'info');
|
if (Debug) log('CreateEntity Icon role level.timer ~' + type + '~' + pageItem.id + '~' + iconId + '~' + iconColor + '~' + name + '~' + timerText, 'info');
|
||||||
return '~' + type + '~' + placeId + '~' + iconId + '~' + iconColor + '~' + name + '~' + timerText;
|
return '~' + type + '~' + pageItem.id + '~' + iconId + '~' + iconColor + '~' + name + '~' + timerText;
|
||||||
|
|
||||||
case 'value.alarmtime':
|
case 'value.alarmtime':
|
||||||
type = 'timer';
|
type = 'timer';
|
||||||
@@ -3909,8 +3897,8 @@ function CreateEntity(pageItem: PageItem, placeId: number, useColors: boolean =
|
|||||||
name = ('0' + String(Math.floor(timer_actual / 60))).slice(-2) + ':' + ('0' + String(timer_actual % 60)).slice(-2);
|
name = ('0' + String(Math.floor(timer_actual / 60))).slice(-2) + ':' + ('0' + String(timer_actual % 60)).slice(-2);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Debug) log('CreateEntity Icon role value.alarmtime ~' + type + '~' + placeId + '~' + iconId + '~' + iconColor + '~' + name + '~' + alarmtimerText + ' ' + val, 'info');
|
if (Debug) log('CreateEntity Icon role value.alarmtime ~' + type + '~' + pageItem.id + '~' + iconId + '~' + iconColor + '~' + name + '~' + alarmtimerText + ' ' + val, 'info');
|
||||||
return '~' + type + '~' + placeId + '~' + iconId + '~' + iconColor + '~' + name + '~' + alarmtimerText;
|
return '~' + type + '~' + pageItem.id + '~' + iconId + '~' + iconColor + '~' + name + '~' + alarmtimerText;
|
||||||
|
|
||||||
case 'level.mode.fan':
|
case 'level.mode.fan':
|
||||||
|
|
||||||
@@ -3930,8 +3918,8 @@ function CreateEntity(pageItem: PageItem, placeId: number, useColors: boolean =
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Debug) log('CreateEntity Icon role level.mode.fan ~' + type + '~' + placeId + '~' + iconId + '~' + iconColor + '~' + name + '~' + optVal, 'info');
|
if (Debug) log('CreateEntity Icon role level.mode.fan ~' + type + '~' + pageItem.id + '~' + iconId + '~' + iconColor + '~' + name + '~' + optVal, 'info');
|
||||||
return '~' + type + '~' + placeId + '~' + iconId + '~' + iconColor + '~' + name + '~' + optVal;
|
return '~' + type + '~' + pageItem.id + '~' + iconId + '~' + iconColor + '~' + name + '~' + optVal;
|
||||||
|
|
||||||
case 'lock':
|
case 'lock':
|
||||||
type = 'button';
|
type = 'button';
|
||||||
@@ -3952,8 +3940,8 @@ function CreateEntity(pageItem: PageItem, placeId: number, useColors: boolean =
|
|||||||
lockState = pageItem.buttonText !== undefined ? pageItem.buttonText : lockState;
|
lockState = pageItem.buttonText !== undefined ? pageItem.buttonText : lockState;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Debug) log('CreateEntity Icon role lock ~' + type + '~' + placeId + '~' + iconId + '~' + iconColor + '~' + name + '~' + lockState, 'info');
|
if (Debug) log('CreateEntity Icon role lock ~' + type + '~' + pageItem.id + '~' + iconId + '~' + iconColor + '~' + name + '~' + lockState, 'info');
|
||||||
return '~' + type + '~' + placeId + '~' + iconId + '~' + iconColor + '~' + name + '~' + lockState;
|
return '~' + type + '~' + pageItem.id + '~' + iconId + '~' + iconColor + '~' + name + '~' + lockState;
|
||||||
|
|
||||||
case 'slider':
|
case 'slider':
|
||||||
type = 'number';
|
type = 'number';
|
||||||
@@ -3961,8 +3949,8 @@ function CreateEntity(pageItem: PageItem, placeId: number, useColors: boolean =
|
|||||||
|
|
||||||
iconColor = GetIconColor(pageItem, false, useColors);
|
iconColor = GetIconColor(pageItem, false, useColors);
|
||||||
|
|
||||||
if (Debug) log('CreateEntity Icon role slider ~' + type + '~' + placeId + '~' + iconId + '~' + iconColor + '~' + name + '~' + val + '|' + pageItem.minValue + '|' + pageItem.maxValue, 'info');
|
if (Debug) log('CreateEntity Icon role slider ~' + type + '~' + pageItem.id + '~' + iconId + '~' + iconColor + '~' + name + '~' + val + '|' + pageItem.minValue + '|' + pageItem.maxValue, 'info');
|
||||||
return '~' + type + '~' + placeId + '~' + iconId + '~' + iconColor + '~' + name + '~' + val + '|' + pageItem.minValue + '|' + pageItem.maxValue;
|
return '~' + type + '~' + pageItem.id + '~' + iconId + '~' + iconColor + '~' + name + '~' + val + '|' + pageItem.minValue + '|' + pageItem.maxValue;
|
||||||
|
|
||||||
case 'volumeGroup':
|
case 'volumeGroup':
|
||||||
case 'volume':
|
case 'volume':
|
||||||
@@ -3983,8 +3971,8 @@ function CreateEntity(pageItem: PageItem, placeId: number, useColors: boolean =
|
|||||||
iconId = Icons.GetIcon('volume-mute');
|
iconId = Icons.GetIcon('volume-mute');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Debug) log('CreateEntity Icon role volumeGroup/volume ~' + type + '~' + placeId + '~' + iconId + '~' + iconColor + '~' + name + '~' + val + '|' + pageItem.minValue + '|' + pageItem.maxValue, 'info');
|
if (Debug) log('CreateEntity Icon role volumeGroup/volume ~' + type + '~' + pageItem.id + '~' + iconId + '~' + iconColor + '~' + name + '~' + val + '|' + pageItem.minValue + '|' + pageItem.maxValue, 'info');
|
||||||
return '~' + type + '~' + placeId + '~' + iconId + '~' + iconColor + '~' + name + '~' + val + '|' + pageItem.minValue + '|' + pageItem.maxValue;
|
return '~' + type + '~' + pageItem.id + '~' + iconId + '~' + iconColor + '~' + name + '~' + val + '|' + pageItem.minValue + '|' + pageItem.maxValue;
|
||||||
|
|
||||||
case 'warning':
|
case 'warning':
|
||||||
type = 'text';
|
type = 'text';
|
||||||
@@ -4000,7 +3988,7 @@ function CreateEntity(pageItem: PageItem, placeId: number, useColors: boolean =
|
|||||||
iconId = itemInfo;
|
iconId = itemInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Debug) log('CreateEntity Icon role warning ~' + type + '~' + placeId + '~' + iconId + '~' + iconColor + '~' + itemName + '~' + itemInfo, 'info');
|
if (Debug) log('CreateEntity Icon role warning ~' + type + '~' + pageItem.id + '~' + iconId + '~' + iconColor + '~' + itemName + '~' + itemInfo, 'info');
|
||||||
return '~' + type + '~' + itemName + '~' + iconId + '~' + iconColor + '~' + itemName + '~' + itemInfo;
|
return '~' + type + '~' + itemName + '~' + iconId + '~' + iconColor + '~' + itemName + '~' + itemInfo;
|
||||||
|
|
||||||
case 'timeTable':
|
case 'timeTable':
|
||||||
@@ -5931,15 +5919,6 @@ function HandleButtonEvent(words: any): void {
|
|||||||
let tempid = words[2].split('?');
|
let tempid = words[2].split('?');
|
||||||
let id = tempid[0];
|
let id = tempid[0];
|
||||||
let buttonAction = words[3];
|
let buttonAction = words[3];
|
||||||
let pageItemID: string = '';
|
|
||||||
|
|
||||||
if (!isNaN(id)) {
|
|
||||||
pageItemID = activePage.items[id].id;
|
|
||||||
if (Debug) {
|
|
||||||
log('HandleButtonEvent activePage: ' + activePage.items.length + ' id: ' + id + ' tempid: ' + tempid + ' pageItemId: ' + pageItemID);
|
|
||||||
}
|
|
||||||
id = pageItemID
|
|
||||||
};
|
|
||||||
|
|
||||||
if (Debug) {
|
if (Debug) {
|
||||||
log('HandleButtonEvent übergebene Werte ' + words[0] + ' - ' + words[1] + ' - ' + words[2] + ' - ' + words[3] + ' - ' + words[4] + ' - PageId: ' + pageId, 'info');
|
log('HandleButtonEvent übergebene Werte ' + words[0] + ' - ' + words[1] + ' - ' + words[2] + ' - ' + words[3] + ' - ' + words[4] + ' - PageId: ' + pageId, 'info');
|
||||||
|
|||||||
Reference in New Issue
Block a user