mirror of
https://github.com/joBr99/nspanel-lovelace-ui.git
synced 2025-12-23 07:54:25 +01:00
Update NsPanelTs.ts
With the change, the offColor can also be used if, for example, the sockets are to be displayed in red and green
This commit is contained in:
@@ -327,6 +327,8 @@ function CreateEntity(pageItem: PageItem, placeId: number, useColors: boolean =
|
||||
if (val === true || val === "true") {
|
||||
optVal = "1"
|
||||
iconColor = GetIconColor(pageItem, true, useColors);
|
||||
} else {
|
||||
iconColor = GetIconColor(pageItem, false, useColors);
|
||||
}
|
||||
|
||||
return "~" + type + "~" + pageItem.id + "~" + iconId + "~" + iconColor + "~" + name + "~" + optVal;
|
||||
|
||||
Reference in New Issue
Block a user