Update v4.1.4.3 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
- 12.08.2023 - v4.1.4.3  Add InSel to popUpLight
This commit is contained in:
Armilar
2023-08-13 22:44:02 +02:00
committed by GitHub
parent 5652387869
commit f4fa14eb16

View File

@@ -1,5 +1,5 @@
/*-----------------------------------------------------------------------
TypeScript v4.1.4.2 zur Steuerung des SONOFF NSPanel mit dem ioBroker by @Armilar / @TT-Tom / @Sternmiere / @Britzelpuf / @ravenS0ne
TypeScript v4.1.4.3 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,8 +147,7 @@ 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
- Todo - v4.1.4.3 Add InSel to popUpLight
- 12.08.2023 - v4.1.4.3 Add InSel to popUpLight
***********************************************************************************************************
@@ -239,7 +238,7 @@ Erforderliche Adapter:
Upgrades in Konsole:
Tasmota BerryDriver : Backlog UpdateDriverVersion https://raw.githubusercontent.com/joBr99/nspanel-lovelace-ui/main/tasmota/autoexec.be; Restart 1
TFT EU STABLE Version : FlashNextion http://nspanel.pky.eu/lovelace-ui/github/nspanel-v4.1.0.tft
TFT EU STABLE Version : FlashNextion http://nspanel.pky.eu/lovelace-ui/github/nspanel-v4.1.4.tft
---------------------------------------------------------------------------------------
*/
@@ -5681,6 +5680,11 @@ function GenerateDetailPage(type: string, optional: string, pageItem: PageItem):
iconColor = GetIconColor(pageItem, false, true);
}
let effect_supported = 'disable';
if (pageItem.modeList != undefined) {
effect_supported = 'enable';
}
out_msgs.push({
payload: 'entityUpdateDetail' + '~' // entityUpdateDetail
+ id + '~'
@@ -5692,7 +5696,8 @@ function GenerateDetailPage(type: string, optional: string, pageItem: PageItem):
+ 'disable' + '~' // colorMode
+ '' + '~' // Color-Bezeichnung
+ findLocale('lights', 'Temperature') + '~' // Temperature-Bezeichnung
+ findLocale('lights', 'Brightness') // Brightness-Bezeichnung
+ findLocale('lights', 'Brightness') + '~' //Brightness-Bezeichnung
+ effect_supported
});
}
@@ -5730,6 +5735,11 @@ function GenerateDetailPage(type: string, optional: string, pageItem: PageItem):
RegisterDetailEntityWatcher(id + '.ACTUAL', pageItem, type);
let effect_supported = 'disable';
if (pageItem.modeList != undefined) {
effect_supported = 'enable';
}
out_msgs.push({
payload: 'entityUpdateDetail' + '~' //entityUpdateDetail
+ id + '~'
@@ -5741,7 +5751,8 @@ function GenerateDetailPage(type: string, optional: string, pageItem: PageItem):
+ 'disable' + '~' //colorMod
+ '' + '~' //Color-Bezeichnung
+ findLocale('lights', 'Temperature') + '~' //Temperature-Bezeichnung
+ findLocale('lights', 'Brightness') //Brightness-Bezeichnung
+ findLocale('lights', 'Brightness') + '~' //Brightness-Bezeichnung
+ effect_supported
});
}
@@ -5797,6 +5808,11 @@ function GenerateDetailPage(type: string, optional: string, pageItem: PageItem):
//console.warn('function GenerateDetailPage role:hue -> Alias-Datenpunkt: ' + id + '.TEMPERATURE could not be read');
}
let effect_supported = 'disable';
if (pageItem.modeList != undefined) {
effect_supported = 'enable';
}
out_msgs.push({
payload: 'entityUpdateDetail' + '~' //entityUpdateDetail
+ id + '~'
@@ -5808,7 +5824,8 @@ function GenerateDetailPage(type: string, optional: string, pageItem: PageItem):
+ colorMode + '~' //colorMode (if hue-alias without hue-datapoint, then disable)
+ 'Color' + '~' //Color-Bezeichnung
+ findLocale('lights', 'Temperature') + '~' //Temperature-Bezeichnung
+ findLocale('lights', 'Brightness') //Brightness-Bezeichnung
+ findLocale('lights', 'Brightness') + '~' //Brightness-Bezeichnung
+ effect_supported
});
}
@@ -5863,6 +5880,11 @@ function GenerateDetailPage(type: string, optional: string, pageItem: PageItem):
//console.warn('function GenerateDetailPage role:rgb -> Alias-Datenpunkt: ' + id + '.TEMPERATURE could not be read');
}
let effect_supported = 'disable';
if (pageItem.modeList != undefined) {
effect_supported = 'enable';
}
out_msgs.push({
payload: 'entityUpdateDetail' + '~' //entityUpdateDetail
+ id + '~'
@@ -5874,7 +5896,8 @@ function GenerateDetailPage(type: string, optional: string, pageItem: PageItem):
+ colorMode + '~' //colorMode (if hue-alias without hue-datapoint, then disable)
+ 'Color' + '~' //Color-Bezeichnung
+ findLocale('lights', 'Temperature') + '~' //Temperature-Bezeichnung
+ findLocale('lights', 'Brightness') //Brightness-Bezeichnung
+ findLocale('lights', 'Brightness') + '~' //Brightness-Bezeichnung
+ effect_supported
});
}
@@ -5934,6 +5957,11 @@ function GenerateDetailPage(type: string, optional: string, pageItem: PageItem):
// console.warn('function GenerateDetailPage role:rgbSingle -> Alias-Datenpunkt: ' + id + '.TEMPERATURE could not be read');
}
let effect_supported = 'disable';
if (pageItem.modeList != undefined) {
effect_supported = 'enable';
}
out_msgs.push({
payload: 'entityUpdateDetail' + '~' //entityUpdateDetail
+ id + '~'
@@ -5945,7 +5973,8 @@ function GenerateDetailPage(type: string, optional: string, pageItem: PageItem):
+ colorMode + '~' //colorMode (if hue-alias without hue-datapoint, then disable)
+ 'Color' + '~' //Color-Bezeichnung
+ findLocale('lights', 'Temperature') + '~' //Temperature-Bezeichnung
+ findLocale('lights', 'Brightness') //Brightness-Bezeichnung
+ findLocale('lights', 'Brightness') + '~' //Brightness-Bezeichnung
+ effect_supported
});
}
@@ -5991,6 +6020,11 @@ function GenerateDetailPage(type: string, optional: string, pageItem: PageItem):
console.warn('function GenerateDetailPage role:ct -> Alias-Datenpunkt: ' + id + '.TEMPERATURE could not be read');
}
let effect_supported = 'disable';
if (pageItem.modeList != undefined) {
effect_supported = 'enable';
}
out_msgs.push({
payload: 'entityUpdateDetail' + '~' //entityUpdateDetail
+ id + '~'
@@ -6002,7 +6036,8 @@ function GenerateDetailPage(type: string, optional: string, pageItem: PageItem):
+ colorMode + '~' //colorMode (if hue-alias without hue-datapoint, then disable)
+ 'Color' + '~' //Color-Bezeichnung
+ findLocale('lights', 'Temperature') + '~' //Temperature-Bezeichnung
+ findLocale('lights', 'Brightness') //Brightness-Bezeichnung
+ findLocale('lights', 'Brightness') + '~' //Brightness-Bezeichnung
+ effect_supported
});
}
}
@@ -6227,6 +6262,7 @@ function GenerateDetailPage(type: string, optional: string, pageItem: PageItem):
}
if (type == 'popupInSel') {
//console.log(o.common.role);
if (o.common.role == 'media') {
let actualState: any = '';
let optionalString: string = 'Kein Eintrag';
@@ -6407,6 +6443,39 @@ function GenerateDetailPage(type: string, optional: string, pageItem: PageItem):
+ actualValue + '~'
+ valueList
});
} else if (o.common.role == 'light' ||
o.common.role == 'dimmer' ||
o.common.role == 'hue' ||
o.common.role == 'rgb' ||
o.common.role == 'rgbSingle' ||
o.common.role == 'ct') {
//console.log(pageItem.id);
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);
}
let tempModeList = [];
for (let i = 0; i < pageItem.modeList.length; i++) {
tempModeList[i] = formatInSelText(pageItem.modeList[i]);
}
let valueList = pageItem.modeList != undefined ? tempModeList.join('?') : '';
//console.log(valueList);
out_msgs.push({
payload: 'entityUpdateDetail2' + '~' //entityUpdateDetail2
+ id + '~~' //{entity_id}
+ rgb_dec565(White) + '~' //{icon_color}~
+ 'insel' + '~'
+ actualValue + '~'
+ valueList
});
}
}
}
}