mirror of
https://github.com/joBr99/nspanel-lovelace-ui.git
synced 2025-12-19 22:24:15 +01:00
Merge pull request #1121 from ticaki/main
some types and scriptname for menu
This commit is contained in:
@@ -542,6 +542,7 @@ let NSPanel_Service_SubPage: PageType =
|
|||||||
/*PageItem*/{ id: AliasPath + 'IoBroker.ScriptVersion', name: findLocaleServMenu('script_version_nspanelts'), offColor: Menu, onColor: Menu },
|
/*PageItem*/{ id: AliasPath + 'IoBroker.ScriptVersion', name: findLocaleServMenu('script_version_nspanelts'), offColor: Menu, onColor: Menu },
|
||||||
/*PageItem*/{ id: AliasPath + 'IoBroker.NodeJSVersion', name: findLocaleServMenu('nodejs_version'), offColor: Menu, onColor: Menu },
|
/*PageItem*/{ id: AliasPath + 'IoBroker.NodeJSVersion', name: findLocaleServMenu('nodejs_version'), offColor: Menu, onColor: Menu },
|
||||||
/*PageItem*/{ id: AliasPath + 'IoBroker.JavaScriptVersion', name: findLocaleServMenu('instance_javascript'), offColor: Menu, onColor: Menu },
|
/*PageItem*/{ id: AliasPath + 'IoBroker.JavaScriptVersion', name: findLocaleServMenu('instance_javascript'), offColor: Menu, onColor: Menu },
|
||||||
|
/*PageItem*/{ id: AliasPath + 'IoBroker.ScriptName', name: findLocaleServMenu('scriptname'), offColor: Menu, onColor: Menu },
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -1039,7 +1040,18 @@ async function CheckConfigParameters() {
|
|||||||
log('Config-Parameter: << config.panelRecvTopic - ' + config.panelRecvTopic + ' >> is not reachable. Please Check Parameters!','error');
|
log('Config-Parameter: << config.panelRecvTopic - ' + config.panelRecvTopic + ' >> is not reachable. Please Check Parameters!','error');
|
||||||
}
|
}
|
||||||
if (existsObject(config.panelSendTopic) == false) {
|
if (existsObject(config.panelSendTopic) == false) {
|
||||||
|
const n = config.panelSendTopic.split('.');
|
||||||
|
const a = n.shift();
|
||||||
|
const i = n.shift();
|
||||||
|
|
||||||
|
if (a === 'mqtt' && !isNaN(Number(i))) {
|
||||||
|
sendTo(`${a}.${i}`, 'sendMessage2Client', {topic: n.join('/'), message: 'time~12:00'});
|
||||||
|
await sleep(500);
|
||||||
|
}
|
||||||
|
if (await existsObjectAsync(config.panelSendTopic) == false) {
|
||||||
log('Config-Parameter: << config.panelSendTopic - ' + config.panelSendTopic + ' >> is not reachable. Please Check Parameters!','error');
|
log('Config-Parameter: << config.panelSendTopic - ' + config.panelSendTopic + ' >> is not reachable. Please Check Parameters!','error');
|
||||||
|
stopScript(scriptName);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (weatherAdapterInstance.substring(0, weatherAdapterInstance.length - 3) == 'daswetter') {
|
if (weatherAdapterInstance.substring(0, weatherAdapterInstance.length - 3) == 'daswetter') {
|
||||||
if (existsObject(weatherAdapterInstance + 'NextHours.Location_1.Day_1.current.symbol_value') == false) {
|
if (existsObject(weatherAdapterInstance + 'NextHours.Location_1.Day_1.current.symbol_value') == false) {
|
||||||
@@ -1064,6 +1076,7 @@ async function CheckConfigParameters() {
|
|||||||
if (common.name == 'javascript') {
|
if (common.name == 'javascript') {
|
||||||
javaScriptVersion = common.version;
|
javaScriptVersion = common.version;
|
||||||
setIfExists(NSPanel_Path + 'IoBroker.JavaScriptVersion', 'v' + javaScriptVersion);
|
setIfExists(NSPanel_Path + 'IoBroker.JavaScriptVersion', 'v' + javaScriptVersion);
|
||||||
|
setIfExists(NSPanel_Path + 'IoBroker.ScriptName', (name as unknown as string).split('.').slice(2).join('.'));
|
||||||
let jsVersion = common.version.split('.');
|
let jsVersion = common.version.split('.');
|
||||||
let jsV = 10*parseInt(jsVersion[0]) + parseInt(jsVersion[1]);
|
let jsV = 10*parseInt(jsVersion[0]) + parseInt(jsVersion[1]);
|
||||||
if (jsV<61) log('JS-Adapter: ' + common.name + ' must be at least v6.1.3. Currently: v' + common.version, 'error');
|
if (jsV<61) log('JS-Adapter: ' + common.name + ' must be at least v6.1.3. Currently: v' + common.version, 'error');
|
||||||
@@ -1116,6 +1129,10 @@ async function InitIoBrokerInfo() {
|
|||||||
await createStateAsync(NSPanel_Path + 'IoBroker.JavaScriptVersion', 'v' + javaScriptVersion, { type: 'string' });
|
await createStateAsync(NSPanel_Path + 'IoBroker.JavaScriptVersion', 'v' + javaScriptVersion, { type: 'string' });
|
||||||
setObject(AliasPath + 'IoBroker.JavaScriptVersion', {type: 'channel', common: {role: 'info', name:'Version JavaScript Instanz'}, native: {}});
|
setObject(AliasPath + 'IoBroker.JavaScriptVersion', {type: 'channel', common: {role: 'info', name:'Version JavaScript Instanz'}, native: {}});
|
||||||
await createAliasAsync(AliasPath + 'IoBroker.JavaScriptVersion.ACTUAL', NSPanel_Path + 'IoBroker.JavaScriptVersion', true, <iobJS.StateCommon>{ type: 'string', role: 'state', name: 'ACTUAL' });
|
await createAliasAsync(AliasPath + 'IoBroker.JavaScriptVersion.ACTUAL', NSPanel_Path + 'IoBroker.JavaScriptVersion', true, <iobJS.StateCommon>{ type: 'string', role: 'state', name: 'ACTUAL' });
|
||||||
|
// ScriptName
|
||||||
|
await createStateAsync(NSPanel_Path + 'IoBroker.ScriptName', 'v' + javaScriptVersion, { type: 'string' });
|
||||||
|
setObject(AliasPath + 'IoBroker.ScriptName', {type: 'channel', common: {role: 'info', name:'Scriptname'}, native: {}});
|
||||||
|
await createAliasAsync(AliasPath + 'IoBroker.ScriptName.ACTUAL', NSPanel_Path + 'IoBroker.ScriptName', true, <iobJS.StateCommon>{ type: 'string', role: 'state', name: 'ACTUAL' });
|
||||||
}
|
}
|
||||||
setIfExists(NSPanel_Path + 'IoBroker.ScriptVersion', scriptVersion);
|
setIfExists(NSPanel_Path + 'IoBroker.ScriptVersion', scriptVersion);
|
||||||
} catch (err: any) {
|
} catch (err: any) {
|
||||||
@@ -2204,7 +2221,7 @@ let scheduleSendDate = schedule('0 * * * *', () => {
|
|||||||
|
|
||||||
// 3:30 a.m. Perform startup and receive current TFT version
|
// 3:30 a.m. Perform startup and receive current TFT version
|
||||||
let scheduleStartup = schedule({ hour: 3, minute: 30 }, async () => {
|
let scheduleStartup = schedule({ hour: 3, minute: 30 }, async () => {
|
||||||
await setStateAsync(config.panelSendTopic, 'pageType~pageStartup');
|
setIfExists(config.panelSendTopic, 'pageType~pageStartup');
|
||||||
});
|
});
|
||||||
|
|
||||||
// Updates currently compare every 12 hours
|
// Updates currently compare every 12 hours
|
||||||
@@ -2217,7 +2234,7 @@ let scheduleCheckUpdates = schedule('{"time":{"start":"00:00","end":"23:59","mod
|
|||||||
// Check for updates with Start
|
// Check for updates with Start
|
||||||
get_locales();
|
get_locales();
|
||||||
get_locales_servicemenu();
|
get_locales_servicemenu();
|
||||||
setState(config.panelSendTopic, 'pageType~pageStartup');
|
setIfExists(config.panelSendTopic, 'pageType~pageStartup');
|
||||||
get_tasmota_status0();
|
get_tasmota_status0();
|
||||||
get_panel_update_data();
|
get_panel_update_data();
|
||||||
check_updates();
|
check_updates();
|
||||||
@@ -2326,7 +2343,7 @@ async function check_updates() {
|
|||||||
if (existsState(NSPanel_Path + 'NSPanel_autoUpdate')) {
|
if (existsState(NSPanel_Path + 'NSPanel_autoUpdate')) {
|
||||||
if (getState(NSPanel_Path + 'NSPanel_autoUpdate').val) {
|
if (getState(NSPanel_Path + 'NSPanel_autoUpdate').val) {
|
||||||
|
|
||||||
if (Debug) log('Auto-Updates eingeschaltet - Update Tasmota wird durchgeführt', 'info');
|
log('Auto-Updates eingeschaltet - Update Tasmota wird durchgeführt', 'info');
|
||||||
|
|
||||||
// Perform Tasmota upgrade
|
// Perform Tasmota upgrade
|
||||||
update_tasmota_firmware();
|
update_tasmota_firmware();
|
||||||
@@ -2354,7 +2371,7 @@ async function check_updates() {
|
|||||||
if (existsState(NSPanel_Path + 'NSPanel_autoUpdate')) {
|
if (existsState(NSPanel_Path + 'NSPanel_autoUpdate')) {
|
||||||
if (getState(NSPanel_Path + 'NSPanel_autoUpdate').val) {
|
if (getState(NSPanel_Path + 'NSPanel_autoUpdate').val) {
|
||||||
|
|
||||||
if (Debug) log('Auto-updates switched on - Berry driver update is carried out', 'info');
|
log('Auto-updates switched on - Berry driver update is carried out', 'info');
|
||||||
|
|
||||||
// Tasmota Berry-Driver Update durchführen
|
// Tasmota Berry-Driver Update durchführen
|
||||||
update_berry_driver_version();
|
update_berry_driver_version();
|
||||||
@@ -2384,7 +2401,7 @@ async function check_updates() {
|
|||||||
if (existsState(NSPanel_Path + 'NSPanel_autoUpdate')) {
|
if (existsState(NSPanel_Path + 'NSPanel_autoUpdate')) {
|
||||||
if (getState(NSPanel_Path + 'NSPanel_autoUpdate').val) {
|
if (getState(NSPanel_Path + 'NSPanel_autoUpdate').val) {
|
||||||
|
|
||||||
if (Debug) log('Auto-updates switched on - update TFT firmware is carried out', 'info');
|
log('Auto-updates switched on - update TFT firmware is carried out', 'info');
|
||||||
|
|
||||||
// TFT-Firmware Update durchführen
|
// TFT-Firmware Update durchführen
|
||||||
update_tft_firmware();
|
update_tft_firmware();
|
||||||
@@ -2951,13 +2968,13 @@ async function SendToPanel(val: Payload | Payload[]) {
|
|||||||
try {
|
try {
|
||||||
if (Array.isArray(val)) {
|
if (Array.isArray(val)) {
|
||||||
val.forEach(function (id) {
|
val.forEach(function (id) {
|
||||||
setStateAsync(config.panelSendTopic, id.payload);
|
setIfExists(config.panelSendTopic, id.payload);
|
||||||
if (Debug) {
|
if (Debug) {
|
||||||
log('function SendToPanel payload: ' + id.payload, 'info');
|
log('function SendToPanel payload: ' + id.payload, 'info');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
setState(config.panelSendTopic, val.payload);
|
setIfExists(config.panelSendTopic, val.payload);
|
||||||
}
|
}
|
||||||
|
|
||||||
} catch (err: any) {
|
} catch (err: any) {
|
||||||
@@ -3021,7 +3038,7 @@ function HandleMessage(typ: string, method: EventMethod, page: number | undefine
|
|||||||
tempId = tempPageItem[0];
|
tempId = tempPageItem[0];
|
||||||
}
|
}
|
||||||
let pageItem: PageItem = findPageItem(tempId);
|
let pageItem: PageItem = findPageItem(tempId);
|
||||||
if (pageItem !== undefined) {
|
if (pageItem !== undefined && isPopupType(words[2])) {
|
||||||
let temp: string | mediaOptional | undefined = tempPageItem[1]
|
let temp: string | mediaOptional | undefined = tempPageItem[1]
|
||||||
if (isMediaOptional(temp)) SendToPanel(GenerateDetailPage(words[2], temp, pageItem, placeId));
|
if (isMediaOptional(temp)) SendToPanel(GenerateDetailPage(words[2], temp, pageItem, placeId));
|
||||||
else SendToPanel(GenerateDetailPage(words[2], undefined, pageItem, placeId));
|
else SendToPanel(GenerateDetailPage(words[2], undefined, pageItem, placeId));
|
||||||
@@ -4191,7 +4208,7 @@ function RegisterEntityWatcher(id: string): void {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function RegisterDetailEntityWatcher(id: string, pageItem: PageItem, type: string, placeId: number | undefined): void {
|
function RegisterDetailEntityWatcher(id: string, pageItem: PageItem, type: PopupType, placeId: number | undefined): void {
|
||||||
try {
|
try {
|
||||||
if (subscriptions.hasOwnProperty(id)) {
|
if (subscriptions.hasOwnProperty(id)) {
|
||||||
return;
|
return;
|
||||||
@@ -7300,7 +7317,7 @@ function GetNavigationString(pageId: number): string {
|
|||||||
}
|
}
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
function GenerateDetailPage(type: string, optional: mediaOptional | undefined, pageItem: PageItem, placeId: number | undefined): Payload[] {
|
function GenerateDetailPage(type: PopupType, optional: mediaOptional | undefined, pageItem: PageItem, placeId: number | undefined): Payload[] {
|
||||||
if (Debug) log('GenerateDetailPage Übergabe Type: ' + type + ' - optional: ' + optional + ' - pageItem.id: ' + pageItem.id, 'info');
|
if (Debug) log('GenerateDetailPage Übergabe Type: ' + type + ' - optional: ' + optional + ' - pageItem.id: ' + pageItem.id, 'info');
|
||||||
try {
|
try {
|
||||||
let out_msgs: Array<Payload> = [];
|
let out_msgs: Array<Payload> = [];
|
||||||
@@ -7968,7 +7985,7 @@ function GenerateDetailPage(type: string, optional: mediaOptional | undefined, p
|
|||||||
let actualMode = pageItem.modeList![getState(id + '.MODE').val];
|
let actualMode = pageItem.modeList![getState(id + '.MODE').val];
|
||||||
|
|
||||||
let tempId = placeId != undefined ? placeId : id;
|
let tempId = placeId != undefined ? placeId : id;
|
||||||
|
// {tempid | icon | iconColor | switchVal | actualSpeed | maxSpeed: | findLocale | actualMode | modeList}
|
||||||
out_msgs.push({
|
out_msgs.push({
|
||||||
payload: 'entityUpdateDetail' + '~' // entityUpdateDetail
|
payload: 'entityUpdateDetail' + '~' // entityUpdateDetail
|
||||||
+ tempId + '~'
|
+ tempId + '~'
|
||||||
@@ -7988,13 +8005,14 @@ function GenerateDetailPage(type: string, optional: mediaOptional | undefined, p
|
|||||||
if (role == 'media') {
|
if (role == 'media') {
|
||||||
let actualState: any = '';
|
let actualState: any = '';
|
||||||
let optionalString: string = 'Kein Eintrag';
|
let optionalString: string = 'Kein Eintrag';
|
||||||
let mode: string = '';
|
let mode: mediaOptional | '' = '';
|
||||||
if (isPageMediaItem(pageItem)) {
|
if (isPageMediaItem(pageItem)) {
|
||||||
const vTempAdapter = (pageItem.adapterPlayerInstance!).split('.');
|
const vTempAdapter = (pageItem.adapterPlayerInstance!).split('.');
|
||||||
const vAdapter: PlayerType = vTempAdapter[0] as PlayerType;
|
const vAdapter: PlayerType = vTempAdapter[0] as PlayerType;
|
||||||
if (optional == 'seek') {
|
if (optional == 'seek') {
|
||||||
let actualStateTemp: number = getState(pageItem.adapterPlayerInstance + 'root.' + pageItem.mediaDevice + '.seek').val;
|
const actualStateTemp: number = getState(pageItem.adapterPlayerInstance + 'root.' + pageItem.mediaDevice + '.seek').val;
|
||||||
if (actualStateTemp >= 95) {
|
actualState = Math.round(actualStateTemp / 10) * 10 + '%';
|
||||||
|
/*if (actualStateTemp >= 95) {
|
||||||
actualState = '100%';
|
actualState = '100%';
|
||||||
} else if (actualStateTemp >= 85) {
|
} else if (actualStateTemp >= 85) {
|
||||||
actualState = '90%';
|
actualState = '90%';
|
||||||
@@ -8016,7 +8034,7 @@ function GenerateDetailPage(type: string, optional: mediaOptional | undefined, p
|
|||||||
actualState = '10%';
|
actualState = '10%';
|
||||||
} else if (actualStateTemp >= 0) {
|
} else if (actualStateTemp >= 0) {
|
||||||
actualState = '0%';
|
actualState = '0%';
|
||||||
}
|
}*/
|
||||||
if (vAdapter == 'sonos') {
|
if (vAdapter == 'sonos') {
|
||||||
optionalString = '0%?10%?20%?30%?40%?50%?60%?70%?80%?90%?100%';
|
optionalString = '0%?10%?20%?30%?40%?50%?60%?70%?80%?90%?100%';
|
||||||
}
|
}
|
||||||
@@ -8215,7 +8233,7 @@ function GenerateDetailPage(type: string, optional: mediaOptional | undefined, p
|
|||||||
}
|
}
|
||||||
|
|
||||||
let tempId = placeId != undefined ? placeId : id;
|
let tempId = placeId != undefined ? placeId : id;
|
||||||
|
// {tempid | color | mediaOptional | actualState | optionalString}
|
||||||
out_msgs.push({
|
out_msgs.push({
|
||||||
payload: 'entityUpdateDetail2' + '~' //entityUpdateDetail
|
payload: 'entityUpdateDetail2' + '~' //entityUpdateDetail
|
||||||
+ tempId + '?' + optional + '~~' //{entity_id}
|
+ tempId + '?' + optional + '~~' //{entity_id}
|
||||||
@@ -8244,7 +8262,7 @@ function GenerateDetailPage(type: string, optional: mediaOptional | undefined, p
|
|||||||
let valueList = pageItem.modeList != undefined ? tempModeList.join('?') : '';
|
let valueList = pageItem.modeList != undefined ? tempModeList.join('?') : '';
|
||||||
|
|
||||||
let tempId = placeId != undefined ? placeId : id;
|
let tempId = placeId != undefined ? placeId : id;
|
||||||
|
// {tempid | color | mediaOptional | actualValue | valueList}
|
||||||
out_msgs.push({
|
out_msgs.push({
|
||||||
payload: 'entityUpdateDetail2' + '~' //entityUpdateDetail2
|
payload: 'entityUpdateDetail2' + '~' //entityUpdateDetail2
|
||||||
+ tempId + '~~' //{entity_id}
|
+ tempId + '~~' //{entity_id}
|
||||||
@@ -8280,7 +8298,7 @@ function GenerateDetailPage(type: string, optional: mediaOptional | undefined, p
|
|||||||
|
|
||||||
//log(valueList);
|
//log(valueList);
|
||||||
let tempId = placeId != undefined ? placeId : id;
|
let tempId = placeId != undefined ? placeId : id;
|
||||||
|
// {tempid | color | 'insel' | actualValue | valueList}
|
||||||
out_msgs.push({
|
out_msgs.push({
|
||||||
payload: 'entityUpdateDetail2' + '~' //entityUpdateDetail2
|
payload: 'entityUpdateDetail2' + '~' //entityUpdateDetail2
|
||||||
+ tempId + '~~' //{entity_id}
|
+ tempId + '~~' //{entity_id}
|
||||||
@@ -8673,10 +8691,8 @@ function HandleScreensaverUpdate(): void {
|
|||||||
if (screensaverAdvanced) {
|
if (screensaverAdvanced) {
|
||||||
// 5 indicatorScreensaverEntities
|
// 5 indicatorScreensaverEntities
|
||||||
for (let i = 0; i < 5 && i < config.indicatorScreensaverEntity.length; i++) {
|
for (let i = 0; i < 5 && i < config.indicatorScreensaverEntity.length; i++) {
|
||||||
let checkpoint = true;
|
|
||||||
const indicatorScreensaverEntity:ScreenSaverElementWithUndefined = config.indicatorScreensaverEntity[i];
|
const indicatorScreensaverEntity:ScreenSaverElementWithUndefined = config.indicatorScreensaverEntity[i];
|
||||||
if (indicatorScreensaverEntity === null || indicatorScreensaverEntity === undefined) {
|
if (indicatorScreensaverEntity === null || indicatorScreensaverEntity === undefined) {
|
||||||
checkpoint = false;
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
RegisterScreensaverEntityWatcher(indicatorScreensaverEntity.ScreensaverEntity)
|
RegisterScreensaverEntityWatcher(indicatorScreensaverEntity.ScreensaverEntity)
|
||||||
@@ -9563,6 +9579,7 @@ function rgb_to_cie(red: number, green: number, blue: number): string
|
|||||||
|
|
||||||
return cie;
|
return cie;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param vDeviceString
|
* @param vDeviceString
|
||||||
@@ -9577,6 +9594,9 @@ function spotifyGetDeviceID(vDeviceString: string): string {
|
|||||||
let strDevID = arrayDeviceListIds[indexPos];
|
let strDevID = arrayDeviceListIds[indexPos];
|
||||||
return strDevID;
|
return strDevID;
|
||||||
}
|
}
|
||||||
|
type PopupType = 'popupFan' | 'popupInSel' | 'popupLight' | 'popupLightNew' | 'popupNotify' | 'popupShutter' | 'popupThermo' | 'popupTimer'
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
type EventMethod = 'startup' | 'sleepReached' | 'pageOpenDetail' | 'buttonPress2' | 'renderCurrentPage' | 'button1' | 'button2'
|
type EventMethod = 'startup' | 'sleepReached' | 'pageOpenDetail' | 'buttonPress2' | 'renderCurrentPage' | 'button1' | 'button2'
|
||||||
|
|
||||||
@@ -9625,7 +9645,7 @@ type PageBaseType = {
|
|||||||
homeIconColor?: RGB
|
homeIconColor?: RGB
|
||||||
};
|
};
|
||||||
|
|
||||||
type PagetypeType = 'cardChart' | 'cardLChart' | 'cardEntities' |'cardGrid'|'cardGrid2'|'cardThermo'|'cardMedia'|'cardUnlock'|'cardQR'|'cardAlarm'|'cardPower'
|
type PagetypeType = 'cardChart' | 'cardLChart' | 'cardEntities' |'cardGrid'|'cardGrid2'|'cardThermo'|'cardMedia'|'cardUnlock'|'cardQR'|'cardAlarm'|'cardPower' //| 'cardBurnRec'
|
||||||
|
|
||||||
type PageType = PageChart | PageEntities | PageGrid | PageGrid2 | PageThermo | PageMedia | PageUnlock | PageQR | PageAlarm | PagePower
|
type PageType = PageChart | PageEntities | PageGrid | PageGrid2 | PageThermo | PageMedia | PageUnlock | PageQR | PageAlarm | PagePower
|
||||||
|
|
||||||
@@ -9715,6 +9735,14 @@ type PageThermoItem = {
|
|||||||
popUpThermoName?: string[],
|
popUpThermoName?: string[],
|
||||||
setThermoAlias?: string[],
|
setThermoAlias?: string[],
|
||||||
setThermoDestTemp2?: string,
|
setThermoDestTemp2?: string,
|
||||||
|
} & PageBaseItem |
|
||||||
|
{
|
||||||
|
popupThermoMode1?: string[],
|
||||||
|
popupThermoMode2?: string[],
|
||||||
|
popupThermoMode3?: string[],
|
||||||
|
popUpThermoName?: string[],
|
||||||
|
setThermoAlias?: string[],
|
||||||
|
setThermoDestTemp2?: string,
|
||||||
} & PageBaseItem
|
} & PageBaseItem
|
||||||
|
|
||||||
type PageBaseItem = {
|
type PageBaseItem = {
|
||||||
@@ -9796,7 +9824,7 @@ type Config = {
|
|||||||
button2: ConfigButtonFunction
|
button2: ConfigButtonFunction
|
||||||
}
|
}
|
||||||
type leftScreensaverEntityType = [ScreenSaverElementWithUndefined, ScreenSaverElementWithUndefined, ScreenSaverElementWithUndefined] | [];
|
type leftScreensaverEntityType = [ScreenSaverElementWithUndefined, ScreenSaverElementWithUndefined, ScreenSaverElementWithUndefined] | [];
|
||||||
type indicatorScreensaverEntityType = [ScreenSaverElementWithUndefined, ScreenSaverElementWithUndefined, ScreenSaverElementWithUndefined, ScreenSaverElementWithUndefined, ScreenSaverElementWithUndefined] | [];
|
type indicatorScreensaverEntityType = [ScreenSaverElementWithUndefined?, ScreenSaverElementWithUndefined?, ScreenSaverElementWithUndefined?, ScreenSaverElementWithUndefined?, ScreenSaverElementWithUndefined?] | [];
|
||||||
type ScreenSaverElementWithUndefined = null | undefined | ScreenSaverElement
|
type ScreenSaverElementWithUndefined = null | undefined | ScreenSaverElement
|
||||||
type ScreenSaverElement = {
|
type ScreenSaverElement = {
|
||||||
ScreensaverEntity: string,
|
ScreensaverEntity: string,
|
||||||
@@ -9892,3 +9920,20 @@ function isEventMethod(F: string | EventMethod): F is EventMethod {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function isPopupType(F: PopupType | string): F is PopupType {
|
||||||
|
switch(F as PopupType) {
|
||||||
|
case "popupFan":
|
||||||
|
case "popupInSel":
|
||||||
|
case "popupLight":
|
||||||
|
case "popupLightNew":
|
||||||
|
case "popupNotify":
|
||||||
|
case "popupShutter":
|
||||||
|
case "popupThermo":
|
||||||
|
case "popupTimer":
|
||||||
|
return true;
|
||||||
|
default:
|
||||||
|
log(`Please report to developer: Unknown PopupType: ${F} `, 'warn');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user