Fix trailing whitespaces on dev version

This commit is contained in:
Yves Schumann
2025-11-15 22:56:44 +01:00
parent fbe5f9658e
commit 0cccfac4a6

View File

@@ -101,7 +101,7 @@ ReleaseNotes:
*************************************************************************************************************** ***************************************************************************************************************
* DE: Für die Erstellung der Aliase durch das Skript, muss in der JavaScript Instanz "setObject" gesetzt sein! * * DE: Für die Erstellung der Aliase durch das Skript, muss in der JavaScript Instanz "setObject" gesetzt sein! *
* EN: In order for the script to create the aliases, “setObject” must be set in the JavaScript instance! * * EN: In order for the script to create the aliases, “setObject” must be set in the JavaScript instance! *
***************************************************************************************************************{ ***************************************************************************************************************
Wenn Rule definiert, dann können die Hardware-Tasten ebenfalls für Seitensteuerung (dann nicht mehr als Relais) genutzt werden Wenn Rule definiert, dann können die Hardware-Tasten ebenfalls für Seitensteuerung (dann nicht mehr als Relais) genutzt werden
@@ -408,10 +408,10 @@ const defaultBackgroundColorParam: any = HMIDark;
- Servicemenü aus pages "NSPanel_Service" unter pages kommentieren ("//" hinzufügen) - Servicemenü aus pages "NSPanel_Service" unter pages kommentieren ("//" hinzufügen)
*/ */
/************************************************************************************************* /***********************************************************************************************
** Service pages with auto alias (subsequent pages are automatically created with alias) ** ** Service pages with auto alias (subsequent pages are automatically created with alias) **
** https://github.com/joBr99/nspanel-lovelace-ui/wiki/NSPanel-Service-Men%C3%BC ** ** https://github.com/joBr99/nspanel-lovelace-ui/wiki/NSPanel-Service-Men%C3%BC **
************************************************************************************************/ ***********************************************************************************************/
/* EN: English /* EN: English
If the service menu needs to be secured, a cardUnlock can be installed upstream. If the service menu needs to be secured, a cardUnlock can be installed upstream.
@@ -824,7 +824,7 @@ export const config: Config = {
NSPanel_Wifi_Info_2, //Auto-Alias Service Page NSPanel_Wifi_Info_2, //Auto-Alias Service Page
NSPanel_Sensoren, //Auto-Alias Service Page NSPanel_Sensoren, //Auto-Alias Service Page
NSPanel_Hardware, //Auto-Alias Service Page NSPanel_Hardware, //Auto-Alias Service Page
NSPanel_IoBroker, //Auot-Alias Service Page NSPanel_IoBroker, //Auto-Alias Service Page
NSPanel_Einstellungen, //Auto-Alias Service Page NSPanel_Einstellungen, //Auto-Alias Service Page
NSPanel_Screensaver, //Auto-Alias Service Page NSPanel_Screensaver, //Auto-Alias Service Page
NSPanel_ScreensaverDimmode, //Auto-Alias Service Page NSPanel_ScreensaverDimmode, //Auto-Alias Service Page
@@ -3899,6 +3899,7 @@ function get_current_tasmota_ip_address () {
log('error at function get_current_tasmota_ip_address: ' + err.message, 'warn'); log('error at function get_current_tasmota_ip_address: ' + err.message, 'warn');
} }
} }
/** /**
* Retrieves the current IP address of the Tasmota device. * Retrieves the current IP address of the Tasmota device.
* *
@@ -4377,7 +4378,6 @@ on({id: config.panelRecvTopic}, async (obj) => {
}); });
/** /**
* Updates the Berry driver version on the NSPanel. * Updates the Berry driver version on the NSPanel.
* *
@@ -5341,7 +5341,7 @@ function CreateEntity (pageItem: PageItem, placeId: number, useColors: boolean =
if (role == 'temperature' || role == 'value.temperature' || role == 'thermostat') { if (role == 'temperature' || role == 'value.temperature' || role == 'thermostat') {
iconId = determinePageItemStatusIcon(pageItem, val, iconId, ['snowflake-thermometer', 'sun-thermometer', 'thermometer']); iconId = determinePageItemStatusIcon(pageItem, val, iconId, ['snowflake-thermometer', 'sun-thermometer', 'thermometer']);
} else if (role == 'humidity' || role == 'value.humidity') { } else if (role == 'humidity' || role == 'value.humidity') {
iconId = determinePageItemStatusIcon(pageItem, val, iconId, ['water-off', 'water-percent-alert' , 'water-percent']); iconId = determinePageItemStatusIcon(pageItem, val, iconId, ['water-off', 'water-percent-alert', 'water-percent']);
} }
iconColor = GetIconColor(pageItem, parseInt(optVal), useColors); iconColor = GetIconColor(pageItem, parseInt(optVal), useColors);
@@ -5448,7 +5448,7 @@ function CreateEntity (pageItem: PageItem, placeId: number, useColors: boolean =
if (pageItem.popupVersion !== undefined) { if (pageItem.popupVersion !== undefined) {
if (pageItem.popupVersion == 1) { if (pageItem.popupVersion == 1) {
type = 'light'; type = 'light';
} else if (pageItem.popupVersion == 2){ } else if (pageItem.popupVersion == 2) {
type = 'light2'; type = 'light2';
} }
} }
@@ -5492,7 +5492,7 @@ function CreateEntity (pageItem: PageItem, placeId: number, useColors: boolean =
if (pageItem.popupVersion !== undefined) { if (pageItem.popupVersion !== undefined) {
if (pageItem.popupVersion == 1) { if (pageItem.popupVersion == 1) {
type = 'light'; type = 'light';
} else if (pageItem.popupVersion == 2){ } else if (pageItem.popupVersion == 2) {
type = 'light2'; type = 'light2';
} }
} }
@@ -5532,7 +5532,7 @@ function CreateEntity (pageItem: PageItem, placeId: number, useColors: boolean =
if (pageItem.popupVersion !== undefined) { if (pageItem.popupVersion !== undefined) {
if (pageItem.popupVersion == 1) { if (pageItem.popupVersion == 1) {
type = 'light'; type = 'light';
} else if (pageItem.popupVersion == 2){ } else if (pageItem.popupVersion == 2) {
type = 'light2'; type = 'light2';
} }
} }
@@ -5587,7 +5587,7 @@ function CreateEntity (pageItem: PageItem, placeId: number, useColors: boolean =
if (pageItem.popupVersion !== undefined) { if (pageItem.popupVersion !== undefined) {
if (pageItem.popupVersion == 1) { if (pageItem.popupVersion == 1) {
type = 'light'; type = 'light';
} else if (pageItem.popupVersion == 2){ } else if (pageItem.popupVersion == 2) {
type = 'light2'; type = 'light2';
} }
} }
@@ -5614,7 +5614,7 @@ function CreateEntity (pageItem: PageItem, placeId: number, useColors: boolean =
if (Debug) log('CIE wurde zuletzt geändert - Lampe ist Color-Mode'); if (Debug) log('CIE wurde zuletzt geändert - Lampe ist Color-Mode');
if (getState(pageItem.id + '.CIE').val != null) { if (getState(pageItem.id + '.CIE').val != null) {
let cie: string = getState(pageItem.id + '.CIE').val; let cie: string = getState(pageItem.id + '.CIE').val;
let cieArray = (cie.substring(1, cie.length -1)).split(','); let cieArray = (cie.substring(1, cie.length - 1)).split(',');
let rgb: RGB = cie_to_rgb(parseFloat(cieArray[0]), parseFloat(cieArray[1]), 254); let rgb: RGB = cie_to_rgb(parseFloat(cieArray[0]), parseFloat(cieArray[1]), 254);
let cRGB: RGB = lightenDarkenColor(ConvertRGBtoHex(rgb.red, rgb.green, rgb.blue), (100 - brightness) * -1); let cRGB: RGB = lightenDarkenColor(ConvertRGBtoHex(rgb.red, rgb.green, rgb.blue), (100 - brightness) * -1);
iconColor = rgb_dec565(pageItem.interpolateColor !== undefined ? cRGB : config.defaultOnColor); iconColor = rgb_dec565(pageItem.interpolateColor !== undefined ? cRGB : config.defaultOnColor);
@@ -5641,7 +5641,7 @@ function CreateEntity (pageItem: PageItem, placeId: number, useColors: boolean =
if (pageItem.popupVersion !== undefined) { if (pageItem.popupVersion !== undefined) {
if (pageItem.popupVersion == 1) { if (pageItem.popupVersion == 1) {
type = 'light'; type = 'light';
} else if (pageItem.popupVersion == 2){ } else if (pageItem.popupVersion == 2) {
type = 'light2'; type = 'light2';
} }
} }
@@ -5697,7 +5697,7 @@ function CreateEntity (pageItem: PageItem, placeId: number, useColors: boolean =
if (pageItem.popupVersion !== undefined) { if (pageItem.popupVersion !== undefined) {
if (pageItem.popupVersion == 1) { if (pageItem.popupVersion == 1) {
type = 'light'; type = 'light';
} else if (pageItem.popupVersion == 2){ } else if (pageItem.popupVersion == 2) {
type = 'light2'; type = 'light2';
} }
} }
@@ -5723,7 +5723,7 @@ function CreateEntity (pageItem: PageItem, placeId: number, useColors: boolean =
if (pageItem.popupVersion !== undefined) { if (pageItem.popupVersion !== undefined) {
if (pageItem.popupVersion == 1) { if (pageItem.popupVersion == 1) {
type = 'shutter'; type = 'shutter';
} else if (pageItem.popupVersion == 2){ } else if (pageItem.popupVersion == 2) {
type = 'shutter2'; type = 'shutter2';
} }
} }
@@ -5864,7 +5864,7 @@ function CreateEntity (pageItem: PageItem, placeId: number, useColors: boolean =
if (role == 'temperature' || role == 'value.temperature' || role == 'thermostat') { if (role == 'temperature' || role == 'value.temperature' || role == 'thermostat') {
iconId = determinePageItemStatusIcon(pageItem, val, iconId, ['snowflake-thermometer', 'sun-thermometer', 'thermometer']); iconId = determinePageItemStatusIcon(pageItem, val, iconId, ['snowflake-thermometer', 'sun-thermometer', 'thermometer']);
} else if (role == 'humidity' || role == 'value.humidity') { } else if (role == 'humidity' || role == 'value.humidity') {
iconId = determinePageItemStatusIcon(pageItem, val, iconId, ['water-off', 'water-percent-alert' , 'water-percent']); iconId = determinePageItemStatusIcon(pageItem, val, iconId, ['water-off', 'water-percent-alert', 'water-percent']);
} }
iconColor = GetIconColor(pageItem, parseInt(optVal), useColors); iconColor = GetIconColor(pageItem, parseInt(optVal), useColors);
@@ -5927,7 +5927,7 @@ function CreateEntity (pageItem: PageItem, placeId: number, useColors: boolean =
if (!pageItem.useValue) iconId = pageItem.icon != undefined ? Icons.GetIcon(pageItem.icon) : iconId; if (!pageItem.useValue) iconId = pageItem.icon != undefined ? Icons.GetIcon(pageItem.icon) : iconId;
iconColor = pageItem.onColor != undefined ? rgb_dec565(pageItem.onColor) : iconColor; iconColor = pageItem.onColor != undefined ? rgb_dec565(pageItem.onColor) : iconColor;
} else { } else {
if(!pageItem.useValue) iconId = pageItem.icon2 != undefined ? Icons.GetIcon(pageItem.icon2) : iconId; if (!pageItem.useValue) iconId = pageItem.icon2 != undefined ? Icons.GetIcon(pageItem.icon2) : iconId;
iconColor = pageItem.offColor != undefined ? rgb_dec565(pageItem.offColor) : iconColor; iconColor = pageItem.offColor != undefined ? rgb_dec565(pageItem.offColor) : iconColor;
} }
} }
@@ -7162,6 +7162,7 @@ function subscribeMediaSubscriptionsSonosAdd (id: string): void {
} }
}); });
} }
/** /**
* Creates media aliases for a specific media device and adapter player instance. * Creates media aliases for a specific media device and adapter player instance.
* *
@@ -8018,9 +8019,9 @@ function GenerateMediaPage (page: NSPanel.PageMedia): NSPanel.Payload[] {
page.items[0].playList = getState(page.items[0].adapterPlayerInstance + 'playlists.playlistListString').val.split(';'); page.items[0].playList = getState(page.items[0].adapterPlayerInstance + 'playlists.playlistListString').val.split(';');
} else if (v2Adapter == 'mpd') { } else if (v2Adapter == 'mpd') {
let tempPL = getState(page.items[0].adapterPlayerInstance + 'listplaylists').val; let tempPL = getState(page.items[0].adapterPlayerInstance + 'listplaylists').val;
tempPL = tempPL.replace('[',''); tempPL = tempPL.replace('[', '');
tempPL = tempPL.replace(']',''); tempPL = tempPL.replace(']', '');
tempPL = tempPL.replaceAll('"',''); tempPL = tempPL.replaceAll('"', '');
page.items[0].playList = tempPL.split(','); page.items[0].playList = tempPL.split(',');
} }
playListIconCol = rgb_dec565(HMIOn); playListIconCol = rgb_dec565(HMIOn);
@@ -9103,6 +9104,7 @@ function triggerButton (id: string): boolean {
} }
return false; return false;
} }
// End Monobutton // End Monobutton
/** /**
@@ -14002,6 +14004,7 @@ on({id: config.panelRecvTopic.substring(0, config.panelRecvTopic.length - 'RESUL
log('error Trigger reading senor-data: ' + err.message, 'warn'); log('error Trigger reading senor-data: ' + err.message, 'warn');
} }
}); });
//------------------End Read Internal Sensor Data //------------------End Read Internal Sensor Data
/** /**
@@ -14449,6 +14452,7 @@ function determineStatusIcon (
if (min === undefined || max === undefined) { if (min === undefined || max === undefined) {
return iconId; return iconId;
} }
function pickIcon(iconKey?: string, defIndex?: number): string { function pickIcon(iconKey?: string, defIndex?: number): string {
return ( return (
(iconKey && existsState(iconKey) && Icons.GetIcon(getState(iconKey).val)) || (iconKey && existsState(iconKey) && Icons.GetIcon(getState(iconKey).val)) ||
@@ -14489,6 +14493,7 @@ function spotifyGetDeviceID (vDeviceString: string): string {
let strDevID = arrayDeviceListIds[indexPos]; let strDevID = arrayDeviceListIds[indexPos];
return strDevID; return strDevID;
} }
/** /**
* Join arguments with ~ and return the string; * Join arguments with ~ and return the string;
* @param tokens unlimited numbers of strings * @param tokens unlimited numbers of strings
@@ -14564,6 +14569,7 @@ function _schedule (time: {hour?: number; minute?: number} | undefined | number,
const timeout = targetTime - new Date().getTime(); const timeout = targetTime - new Date().getTime();
scheduleList[ref] = setTimeout(_schedule, timeout, time, ref, repeatTime, callback); scheduleList[ref] = setTimeout(_schedule, timeout, time, ref, repeatTime, callback);
} }
/** /**
* Clears a scheduled task based on the reference ID. * Clears a scheduled task based on the reference ID.
* *
@@ -14578,6 +14584,7 @@ function _clearSchedule (ref: number): null {
delete scheduleList[ref]; delete scheduleList[ref];
return null; return null;
} }
const ArrayPlayerTypeWithMediaDevice = ['alexa2', 'sonos', 'squeezeboxrpc'] as const; const ArrayPlayerTypeWithMediaDevice = ['alexa2', 'sonos', 'squeezeboxrpc'] as const;
const ArrayPlayerTypeWithOutMediaDevice = ['spotify-premium', 'volumio', 'bosesoundtouch', 'mpd'] as const; const ArrayPlayerTypeWithOutMediaDevice = ['spotify-premium', 'volumio', 'bosesoundtouch', 'mpd'] as const;
@@ -14593,6 +14600,7 @@ const ArrayPlayerTypeWithOutMediaDevice = ['spotify-premium', 'volumio', 'boseso
function isPlayerWithMediaDevice (F: string | NSPanel._PlayerTypeWithMediaDevice): F is NSPanel._PlayerTypeWithMediaDevice { function isPlayerWithMediaDevice (F: string | NSPanel._PlayerTypeWithMediaDevice): F is NSPanel._PlayerTypeWithMediaDevice {
return ArrayPlayerTypeWithMediaDevice.indexOf(F as NSPanel._PlayerTypeWithMediaDevice) != -1; return ArrayPlayerTypeWithMediaDevice.indexOf(F as NSPanel._PlayerTypeWithMediaDevice) != -1;
} }
/** check if NSPanel.adapterPlayerInstanceType has all Playertypes */ /** check if NSPanel.adapterPlayerInstanceType has all Playertypes */
function checkSortedPlayerType (F: NSPanel.notSortedPlayerType) { function checkSortedPlayerType (F: NSPanel.notSortedPlayerType) {
const test: NSPanel.adapterPlayerInstanceType = F; const test: NSPanel.adapterPlayerInstanceType = F;
@@ -14678,10 +14686,12 @@ function isPopupType (F: NSPanel.PopupType | string): F is NSPanel.PopupType {
return false; return false;
} }
} }
// If u get a error here u forgot something in PagetypeType or PageType // If u get a error here u forgot something in PagetypeType or PageType
function checkPageType (F: NSPanel.PagetypeType, A: NSPanel.PageType) { function checkPageType (F: NSPanel.PagetypeType, A: NSPanel.PageType) {
A.type = F; A.type = F;
} }
function isPageMediaItem (F: NSPanel.PageItem | NSPanel.PageMediaItem): F is NSPanel.PageMediaItem { function isPageMediaItem (F: NSPanel.PageItem | NSPanel.PageMediaItem): F is NSPanel.PageMediaItem {
return 'adapterPlayerInstance' in F; return 'adapterPlayerInstance' in F;
} }
@@ -14693,6 +14703,7 @@ function isPageThermoItem (F: PageItem | NSPanel.PageThermoItem): F is NSPanel.P
function isPageMedia (F: NSPanel.PageType | NSPanel.PageMedia): F is NSPanel.PageMedia { function isPageMedia (F: NSPanel.PageType | NSPanel.PageMedia): F is NSPanel.PageMedia {
return F.type == 'cardMedia'; return F.type == 'cardMedia';
} }
function isPagePower (F: NSPanel.PageType | NSPanel.PagePower): F is NSPanel.PagePower { function isPagePower (F: NSPanel.PageType | NSPanel.PagePower): F is NSPanel.PagePower {
return F.type == 'cardPower'; return F.type == 'cardPower';
} }