mirror of
https://github.com/joBr99/nspanel-lovelace-ui.git
synced 2025-12-19 22:24:15 +01:00
Fix trailing whitespaces
This commit is contained in:
@@ -99,7 +99,7 @@ ReleaseNotes:
|
||||
***************************************************************************************************************
|
||||
* 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! *
|
||||
***************************************************************************************************************{
|
||||
***************************************************************************************************************
|
||||
|
||||
Wenn Rule definiert, dann können die Hardware-Tasten ebenfalls für Seitensteuerung (dann nicht mehr als Relais) genutzt werden
|
||||
|
||||
@@ -406,10 +406,10 @@ const defaultBackgroundColorParam: any = HMIDark;
|
||||
- Servicemenü aus pages "NSPanel_Service" unter pages kommentieren ("//" hinzufügen)
|
||||
*/
|
||||
|
||||
/*************************************************************************************************
|
||||
/***********************************************************************************************
|
||||
** 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 **
|
||||
************************************************************************************************/
|
||||
***********************************************************************************************/
|
||||
|
||||
/* EN: English
|
||||
If the service menu needs to be secured, a cardUnlock can be installed upstream.
|
||||
@@ -822,7 +822,7 @@ export const config: Config = {
|
||||
NSPanel_Wifi_Info_2, //Auto-Alias Service Page
|
||||
NSPanel_Sensoren, //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_Screensaver, //Auto-Alias Service Page
|
||||
NSPanel_ScreensaverDimmode, //Auto-Alias Service Page
|
||||
@@ -3895,6 +3895,7 @@ function get_current_tasmota_ip_address () {
|
||||
log('error at function get_current_tasmota_ip_address: ' + err.message, 'warn');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves the current IP address of the Tasmota device.
|
||||
*
|
||||
@@ -4373,7 +4374,6 @@ on({id: config.panelRecvTopic}, async (obj) => {
|
||||
});
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Updates the Berry driver version on the NSPanel.
|
||||
*
|
||||
@@ -5337,7 +5337,7 @@ function CreateEntity (pageItem: PageItem, placeId: number, useColors: boolean =
|
||||
if (role == 'temperature' || role == 'value.temperature' || role == 'thermostat') {
|
||||
iconId = determinePageItemStatusIcon(pageItem, val, iconId, ['snowflake-thermometer', 'sun-thermometer', 'thermometer']);
|
||||
} 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);
|
||||
|
||||
@@ -5444,7 +5444,7 @@ function CreateEntity (pageItem: PageItem, placeId: number, useColors: boolean =
|
||||
if (pageItem.popupVersion !== undefined) {
|
||||
if (pageItem.popupVersion == 1) {
|
||||
type = 'light';
|
||||
} else if (pageItem.popupVersion == 2){
|
||||
} else if (pageItem.popupVersion == 2) {
|
||||
type = 'light2';
|
||||
}
|
||||
}
|
||||
@@ -5488,7 +5488,7 @@ function CreateEntity (pageItem: PageItem, placeId: number, useColors: boolean =
|
||||
if (pageItem.popupVersion !== undefined) {
|
||||
if (pageItem.popupVersion == 1) {
|
||||
type = 'light';
|
||||
} else if (pageItem.popupVersion == 2){
|
||||
} else if (pageItem.popupVersion == 2) {
|
||||
type = 'light2';
|
||||
}
|
||||
}
|
||||
@@ -5528,7 +5528,7 @@ function CreateEntity (pageItem: PageItem, placeId: number, useColors: boolean =
|
||||
if (pageItem.popupVersion !== undefined) {
|
||||
if (pageItem.popupVersion == 1) {
|
||||
type = 'light';
|
||||
} else if (pageItem.popupVersion == 2){
|
||||
} else if (pageItem.popupVersion == 2) {
|
||||
type = 'light2';
|
||||
}
|
||||
}
|
||||
@@ -5583,7 +5583,7 @@ function CreateEntity (pageItem: PageItem, placeId: number, useColors: boolean =
|
||||
if (pageItem.popupVersion !== undefined) {
|
||||
if (pageItem.popupVersion == 1) {
|
||||
type = 'light';
|
||||
} else if (pageItem.popupVersion == 2){
|
||||
} else if (pageItem.popupVersion == 2) {
|
||||
type = 'light2';
|
||||
}
|
||||
}
|
||||
@@ -5610,7 +5610,7 @@ function CreateEntity (pageItem: PageItem, placeId: number, useColors: boolean =
|
||||
if (Debug) log('CIE wurde zuletzt geändert - Lampe ist Color-Mode');
|
||||
if (getState(pageItem.id + '.CIE').val != null) {
|
||||
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 cRGB: RGB = lightenDarkenColor(ConvertRGBtoHex(rgb.red, rgb.green, rgb.blue), (100 - brightness) * -1);
|
||||
iconColor = rgb_dec565(pageItem.interpolateColor !== undefined ? cRGB : config.defaultOnColor);
|
||||
@@ -5637,7 +5637,7 @@ function CreateEntity (pageItem: PageItem, placeId: number, useColors: boolean =
|
||||
if (pageItem.popupVersion !== undefined) {
|
||||
if (pageItem.popupVersion == 1) {
|
||||
type = 'light';
|
||||
} else if (pageItem.popupVersion == 2){
|
||||
} else if (pageItem.popupVersion == 2) {
|
||||
type = 'light2';
|
||||
}
|
||||
}
|
||||
@@ -5693,7 +5693,7 @@ function CreateEntity (pageItem: PageItem, placeId: number, useColors: boolean =
|
||||
if (pageItem.popupVersion !== undefined) {
|
||||
if (pageItem.popupVersion == 1) {
|
||||
type = 'light';
|
||||
} else if (pageItem.popupVersion == 2){
|
||||
} else if (pageItem.popupVersion == 2) {
|
||||
type = 'light2';
|
||||
}
|
||||
}
|
||||
@@ -5719,7 +5719,7 @@ function CreateEntity (pageItem: PageItem, placeId: number, useColors: boolean =
|
||||
if (pageItem.popupVersion !== undefined) {
|
||||
if (pageItem.popupVersion == 1) {
|
||||
type = 'shutter';
|
||||
} else if (pageItem.popupVersion == 2){
|
||||
} else if (pageItem.popupVersion == 2) {
|
||||
type = 'shutter2';
|
||||
}
|
||||
}
|
||||
@@ -5860,7 +5860,7 @@ function CreateEntity (pageItem: PageItem, placeId: number, useColors: boolean =
|
||||
if (role == 'temperature' || role == 'value.temperature' || role == 'thermostat') {
|
||||
iconId = determinePageItemStatusIcon(pageItem, val, iconId, ['snowflake-thermometer', 'sun-thermometer', 'thermometer']);
|
||||
} 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);
|
||||
@@ -5923,7 +5923,7 @@ function CreateEntity (pageItem: PageItem, placeId: number, useColors: boolean =
|
||||
if (!pageItem.useValue) iconId = pageItem.icon != undefined ? Icons.GetIcon(pageItem.icon) : iconId;
|
||||
iconColor = pageItem.onColor != undefined ? rgb_dec565(pageItem.onColor) : iconColor;
|
||||
} 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;
|
||||
}
|
||||
}
|
||||
@@ -7158,6 +7158,7 @@ function subscribeMediaSubscriptionsSonosAdd (id: string): void {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates media aliases for a specific media device and adapter player instance.
|
||||
*
|
||||
@@ -8014,9 +8015,9 @@ function GenerateMediaPage (page: NSPanel.PageMedia): NSPanel.Payload[] {
|
||||
page.items[0].playList = getState(page.items[0].adapterPlayerInstance + 'playlists.playlistListString').val.split(';');
|
||||
} else if (v2Adapter == 'mpd') {
|
||||
let tempPL = getState(page.items[0].adapterPlayerInstance + 'listplaylists').val;
|
||||
tempPL = tempPL.replace('[','');
|
||||
tempPL = tempPL.replace(']','');
|
||||
tempPL = tempPL.replaceAll('"','');
|
||||
tempPL = tempPL.replace('[', '');
|
||||
tempPL = tempPL.replace(']', '');
|
||||
tempPL = tempPL.replaceAll('"', '');
|
||||
page.items[0].playList = tempPL.split(',');
|
||||
}
|
||||
playListIconCol = rgb_dec565(HMIOn);
|
||||
@@ -9099,6 +9100,7 @@ function triggerButton (id: string): boolean {
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
// End Monobutton
|
||||
|
||||
/**
|
||||
@@ -13919,6 +13921,7 @@ on({id: config.panelRecvTopic.substring(0, config.panelRecvTopic.length - 'RESUL
|
||||
log('error Trigger reading senor-data: ' + err.message, 'warn');
|
||||
}
|
||||
});
|
||||
|
||||
//------------------End Read Internal Sensor Data
|
||||
|
||||
/**
|
||||
@@ -14366,6 +14369,7 @@ function determineStatusIcon (
|
||||
if (min === undefined || max === undefined) {
|
||||
return iconId;
|
||||
}
|
||||
|
||||
function pickIcon(iconKey?: string, defIndex?: number): string {
|
||||
return (
|
||||
(iconKey && existsState(iconKey) && Icons.GetIcon(getState(iconKey).val)) ||
|
||||
@@ -14406,6 +14410,7 @@ function spotifyGetDeviceID (vDeviceString: string): string {
|
||||
let strDevID = arrayDeviceListIds[indexPos];
|
||||
return strDevID;
|
||||
}
|
||||
|
||||
/**
|
||||
* Join arguments with ~ and return the string;
|
||||
* @param tokens unlimited numbers of strings
|
||||
@@ -14481,6 +14486,7 @@ function _schedule (time: {hour?: number; minute?: number} | undefined | number,
|
||||
const timeout = targetTime - new Date().getTime();
|
||||
scheduleList[ref] = setTimeout(_schedule, timeout, time, ref, repeatTime, callback);
|
||||
}
|
||||
|
||||
/**
|
||||
* Clears a scheduled task based on the reference ID.
|
||||
*
|
||||
@@ -14495,6 +14501,7 @@ function _clearSchedule (ref: number): null {
|
||||
delete scheduleList[ref];
|
||||
return null;
|
||||
}
|
||||
|
||||
const ArrayPlayerTypeWithMediaDevice = ['alexa2', 'sonos', 'squeezeboxrpc'] as const;
|
||||
const ArrayPlayerTypeWithOutMediaDevice = ['spotify-premium', 'volumio', 'bosesoundtouch', 'mpd'] as const;
|
||||
|
||||
@@ -14510,6 +14517,7 @@ const ArrayPlayerTypeWithOutMediaDevice = ['spotify-premium', 'volumio', 'boseso
|
||||
function isPlayerWithMediaDevice (F: string | NSPanel._PlayerTypeWithMediaDevice): F is NSPanel._PlayerTypeWithMediaDevice {
|
||||
return ArrayPlayerTypeWithMediaDevice.indexOf(F as NSPanel._PlayerTypeWithMediaDevice) != -1;
|
||||
}
|
||||
|
||||
/** check if NSPanel.adapterPlayerInstanceType has all Playertypes */
|
||||
function checkSortedPlayerType (F: NSPanel.notSortedPlayerType) {
|
||||
const test: NSPanel.adapterPlayerInstanceType = F;
|
||||
@@ -14595,10 +14603,12 @@ function isPopupType (F: NSPanel.PopupType | string): F is NSPanel.PopupType {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// If u get a error here u forgot something in PagetypeType or PageType
|
||||
function checkPageType (F: NSPanel.PagetypeType, A: NSPanel.PageType) {
|
||||
A.type = F;
|
||||
}
|
||||
|
||||
function isPageMediaItem (F: NSPanel.PageItem | NSPanel.PageMediaItem): F is NSPanel.PageMediaItem {
|
||||
return 'adapterPlayerInstance' in F;
|
||||
}
|
||||
@@ -14610,6 +14620,7 @@ function isPageThermoItem (F: PageItem | NSPanel.PageThermoItem): F is NSPanel.P
|
||||
function isPageMedia (F: NSPanel.PageType | NSPanel.PageMedia): F is NSPanel.PageMedia {
|
||||
return F.type == 'cardMedia';
|
||||
}
|
||||
|
||||
function isPagePower (F: NSPanel.PageType | NSPanel.PagePower): F is NSPanel.PagePower {
|
||||
return F.type == 'cardPower';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user