Skip to content

Commit

Permalink
Merge pull request #1304 from ticaki/main
Browse files Browse the repository at this point in the history
Different treatment of icon3 fixed
  • Loading branch information
Armilar authored Jan 23, 2025
2 parents 78d20f8 + e54faea commit 11bf450
Showing 1 changed file with 13 additions and 8 deletions.
21 changes: 13 additions & 8 deletions ioBroker/DEV/NSPanelTs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,8 @@ 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

Tasmota Konsole:
Expand Down Expand Up @@ -5201,8 +5201,11 @@ function CreateEntity (pageItem: PageItem, placeId: number, useColors: boolean =
unit = pageItem.unit !== undefined ? pageItem.unit : GetUnitOfMeasurement(pageItem.id + '.ACTUAL');
}

iconId = determinePageItemStatusIcon(pageItem, val, iconId, ['snowflake-thermometer', 'sun-thermometer', 'thermometer']);

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']);
}
iconColor = GetIconColor(pageItem, parseInt(optVal), useColors);

if (pageItem.colorScale != undefined) {
Expand Down Expand Up @@ -5566,6 +5569,8 @@ 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']);
}

iconColor = GetIconColor(pageItem, parseInt(optVal), useColors);
Expand Down Expand Up @@ -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 {number} val - The current value used to evaluate thresholds.
* @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.
*/
function determinePageItemStatusIcon (pageItem: PageItem, val: number, iconId: string, def?: [string, string, string]): string {
Expand Down Expand Up @@ -12967,9 +12972,9 @@ namespace NSPanel {
{icon: 'thermometer-high', value: 30},
{icon: 'thermometer', value: 25},
{icon: 'thermometer-low', value: 15},
{icon: 'thermometer-minus', value: 3},
{icon: 'snowflake-thermometer', value: -3},
{icon: 'snowflake', value: 10},
{icon: 'snowflake-alert', value: 2},
{icon: 'snowflake-thermometer', value: -2},
{icon: 'snowflake', value: -10},
]
*/
ScreensaverEntityIconSelect?: {icon:string, value: number}[] | null;
Expand Down

0 comments on commit 11bf450

Please sign in to comment.