Merge pull request #1396 from starwarsfan/feature/fixTrailingWhitespaces

Feature/fix trailing whitespaces
This commit is contained in:
Armilar
2025-11-16 11:37:40 +01:00
committed by GitHub
2 changed files with 741 additions and 719 deletions

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! *
* 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
@@ -408,10 +408,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.
@@ -824,7 +824,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
@@ -3899,6 +3899,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.
*
@@ -4377,7 +4378,6 @@ on({id: config.panelRecvTopic}, async (obj) => {
});
/**
* Updates the Berry driver version on the NSPanel.
*
@@ -7162,6 +7162,7 @@ function subscribeMediaSubscriptionsSonosAdd (id: string): void {
}
});
}
/**
* Creates media aliases for a specific media device and adapter player instance.
*
@@ -9103,6 +9104,7 @@ function triggerButton (id: string): boolean {
}
return false;
}
// 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');
}
});
//------------------End Read Internal Sensor Data
/**
@@ -14449,6 +14452,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)) ||
@@ -14489,6 +14493,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
@@ -14564,6 +14569,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.
*
@@ -14578,6 +14584,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;
@@ -14593,6 +14600,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;
@@ -14678,10 +14686,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;
}
@@ -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 {
return F.type == 'cardMedia';
}
function isPagePower (F: NSPanel.PageType | NSPanel.PagePower): F is NSPanel.PagePower {
return F.type == 'cardPower';
}

View File

@@ -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.
*
@@ -7158,6 +7158,7 @@ function subscribeMediaSubscriptionsSonosAdd (id: string): void {
}
});
}
/**
* Creates media aliases for a specific media device and adapter player instance.
*
@@ -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';
}