mirror of
https://github.com/joBr99/nspanel-lovelace-ui.git
synced 2025-12-20 06:27:01 +01:00
Merge pull request #1304 from ticaki/main
Different treatment of icon3 fixed
This commit is contained in:
@@ -150,7 +150,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
|
||||||
|
|
||||||
@@ -5201,8 +5201,11 @@ function CreateEntity (pageItem: PageItem, placeId: number, useColors: boolean =
|
|||||||
unit = pageItem.unit !== undefined ? pageItem.unit : GetUnitOfMeasurement(pageItem.id + '.ACTUAL');
|
unit = pageItem.unit !== undefined ? pageItem.unit : GetUnitOfMeasurement(pageItem.id + '.ACTUAL');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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') {
|
||||||
|
iconId = determinePageItemStatusIcon(pageItem, val, iconId, ['water-off', 'water-percent-alert' , 'water-percent']);
|
||||||
|
}
|
||||||
iconColor = GetIconColor(pageItem, parseInt(optVal), useColors);
|
iconColor = GetIconColor(pageItem, parseInt(optVal), useColors);
|
||||||
|
|
||||||
if (pageItem.colorScale != undefined) {
|
if (pageItem.colorScale != undefined) {
|
||||||
@@ -5566,6 +5569,8 @@ 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') {
|
||||||
|
iconId = determinePageItemStatusIcon(pageItem, val, iconId, ['water-off', 'water-percent-alert' , 'water-percent']);
|
||||||
}
|
}
|
||||||
|
|
||||||
iconColor = GetIconColor(pageItem, parseInt(optVal), useColors);
|
iconColor = GetIconColor(pageItem, parseInt(optVal), useColors);
|
||||||
@@ -12272,7 +12277,7 @@ function rgb_to_cie (red: number, green: number, blue: number): string {
|
|||||||
* @param {PageItem} pageItem - Contains icon references (icon, icon2, icon3) and threshold values.
|
* @param {PageItem} pageItem - Contains icon references (icon, icon2, icon3) and threshold values.
|
||||||
* @param {number} val - The current value used to evaluate thresholds.
|
* @param {number} val - The current value used to evaluate thresholds.
|
||||||
* @param {string} iconId - The fallback icon ID if no matching icon is found.
|
* @param {string} iconId - The fallback icon ID if no matching icon is found.
|
||||||
* @param {[string, string, string]} [def] - Optional array of default icons corresponding to threshold levels.
|
* @param {[string, string, string]} [def] - Optional array of default icons corresponding to threshold levels. [low, high, between]
|
||||||
* @returns {string} The icon ID determined by value, thresholds, and defaults.
|
* @returns {string} The icon ID determined by value, thresholds, and defaults.
|
||||||
*/
|
*/
|
||||||
function determinePageItemStatusIcon (pageItem: PageItem, val: number, iconId: string, def?: [string, string, string]): string {
|
function determinePageItemStatusIcon (pageItem: PageItem, val: number, iconId: string, def?: [string, string, string]): string {
|
||||||
@@ -12967,9 +12972,9 @@ namespace NSPanel {
|
|||||||
{icon: 'thermometer-high', value: 30},
|
{icon: 'thermometer-high', value: 30},
|
||||||
{icon: 'thermometer', value: 25},
|
{icon: 'thermometer', value: 25},
|
||||||
{icon: 'thermometer-low', value: 15},
|
{icon: 'thermometer-low', value: 15},
|
||||||
{icon: 'thermometer-minus', value: 3},
|
{icon: 'snowflake-alert', value: 2},
|
||||||
{icon: 'snowflake-thermometer', value: -3},
|
{icon: 'snowflake-thermometer', value: -2},
|
||||||
{icon: 'snowflake', value: 10},
|
{icon: 'snowflake', value: -10},
|
||||||
]
|
]
|
||||||
*/
|
*/
|
||||||
ScreensaverEntityIconSelect?: {icon:string, value: number}[] | null;
|
ScreensaverEntityIconSelect?: {icon:string, value: number}[] | null;
|
||||||
|
|||||||
Reference in New Issue
Block a user