mirror of
https://github.com/joBr99/nspanel-lovelace-ui.git
synced 2025-12-22 15:34:26 +01:00
ALIAS "socket" and "light" with optional OFF-Icon
Example: Line 224
This commit is contained in:
@@ -23,6 +23,7 @@ ReleaseNotes:
|
|||||||
- 19.06.2022 - V3.1.0 - Bugfix toLocalTimeString in en-EN/en-US
|
- 19.06.2022 - V3.1.0 - Bugfix toLocalTimeString in en-EN/en-US
|
||||||
- 19.06.2022 - V3.1.0 - Fehler in findLocale abgefangen
|
- 19.06.2022 - V3.1.0 - Fehler in findLocale abgefangen
|
||||||
- 19.06.2022 - V3.1.0 - Umstellung auf "Home Assistant" Sprachfile
|
- 19.06.2022 - V3.1.0 - Umstellung auf "Home Assistant" Sprachfile
|
||||||
|
- 19.06.2022 - V3.1.0 - Alias "light" und "socket" haben optionalen Parameter icon2 für negative Zustände
|
||||||
|
|
||||||
Known Bug
|
Known Bug
|
||||||
- Github Issue #286
|
- Github Issue #286
|
||||||
@@ -148,7 +149,7 @@ var weatherForecast = true; //true = WheatherForecast 5 Days --- false = Config
|
|||||||
|
|
||||||
//Alexa-Instanz
|
//Alexa-Instanz
|
||||||
var alexaInstanz = "alexa2.0"
|
var alexaInstanz = "alexa2.0"
|
||||||
var alexaDevice = "G0XXXXXXXXXXXXXX"; //Primär zu steuerndes Device oder Gruppe aus alexa2-Adapter (Seriennummer)
|
var alexaDevice = "G0XXXXXXXXXXXXXXX"; //Primär zu steuerndes Device oder Gruppe aus alexa2-Adapter (Seriennummer)
|
||||||
|
|
||||||
// Wenn alexaSpeakerList definiert, dann werden Einträge verwendet, sonst alle relevanten Devices aus Alexa-Instanz
|
// Wenn alexaSpeakerList definiert, dann werden Einträge verwendet, sonst alle relevanten Devices aus Alexa-Instanz
|
||||||
// Speakerwechsel funktioniert nicht bei Radio/TuneIn sonden bei Playlists
|
// Speakerwechsel funktioniert nicht bei Radio/TuneIn sonden bei Playlists
|
||||||
@@ -219,7 +220,8 @@ var Buero_Seite_1: PageEntities =
|
|||||||
<PageItem>{ id: "alias.0.NSPanel_1.Schreibtischlampe", interpolateColor: true},
|
<PageItem>{ id: "alias.0.NSPanel_1.Schreibtischlampe", interpolateColor: true},
|
||||||
<PageItem>{ id: "alias.0.NSPanel_1.Deckenbeleuchtung", interpolateColor: true},
|
<PageItem>{ id: "alias.0.NSPanel_1.Deckenbeleuchtung", interpolateColor: true},
|
||||||
<PageItem>{ id: "alias.0.NSPanel_1.Testlampe2", name: "Filamentlampe", minValueBrightness: 0, maxValueBrightness: 70, interpolateColor: true},
|
<PageItem>{ id: "alias.0.NSPanel_1.Testlampe2", name: "Filamentlampe", minValueBrightness: 0, maxValueBrightness: 70, interpolateColor: true},
|
||||||
<PageItem>{ id: "alias.0.NSPanel_1.Luftreiniger", icon: "power", offColor: MSRed, onColor: MSGreen}
|
//<PageItem>{ id: "alias.0.NSPanel_1.Luftreiniger", icon: "power", icon2: "",offColor: MSRed, onColor: MSGreen}
|
||||||
|
<PageItem>{ id: "alias.0.NSPanel_1.TestVentil1", icon: "valve-open", icon2: "valve-closed",offColor: MSRed, onColor: MSGreen} //based on socket
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -451,7 +453,7 @@ export const config: Config = {
|
|||||||
dimmode: 8,
|
dimmode: 8,
|
||||||
active: 100, //Standard-Brightness TFT
|
active: 100, //Standard-Brightness TFT
|
||||||
screenSaverDoubleClick: false,
|
screenSaverDoubleClick: false,
|
||||||
locale: "en-US", //en-US, de-DE, nl-NL, da-DK, es-ES, fr-FR, it-IT, ru-RU, etc.
|
locale: "de-DE", //en-US, de-DE, nl-NL, da-DK, es-ES, fr-FR, it-IT, ru-RU, etc.
|
||||||
timeFormat: "%H:%M", //currently not used
|
timeFormat: "%H:%M", //currently not used
|
||||||
dateFormat: "%A, %d. %B %Y", //currently not used
|
dateFormat: "%A, %d. %B %Y", //currently not used
|
||||||
weatherEntity: "alias.0.Wetter",
|
weatherEntity: "alias.0.Wetter",
|
||||||
@@ -1095,6 +1097,7 @@ function CreateEntity(pageItem: PageItem, placeId: number, useColors: boolean =
|
|||||||
case "light":
|
case "light":
|
||||||
type = "light"
|
type = "light"
|
||||||
iconId = pageItem.icon !== undefined ? Icons.GetIcon(pageItem.icon) : o.common.role == "socket" ? Icons.GetIcon("power-socket-de") : Icons.GetIcon("lightbulb");
|
iconId = pageItem.icon !== undefined ? Icons.GetIcon(pageItem.icon) : o.common.role == "socket" ? Icons.GetIcon("power-socket-de") : Icons.GetIcon("lightbulb");
|
||||||
|
var iconId2 = pageItem.icon !== undefined ? Icons.GetIcon(pageItem.icon2) : o.common.role == "socket" ? Icons.GetIcon("power-socket-de") : Icons.GetIcon("lightbulb");
|
||||||
var optVal = "0"
|
var optVal = "0"
|
||||||
|
|
||||||
if (val === true || val === "true") {
|
if (val === true || val === "true") {
|
||||||
@@ -1102,6 +1105,7 @@ function CreateEntity(pageItem: PageItem, placeId: number, useColors: boolean =
|
|||||||
iconColor = GetIconColor(pageItem, true, useColors);
|
iconColor = GetIconColor(pageItem, true, useColors);
|
||||||
} else {
|
} else {
|
||||||
iconColor = GetIconColor(pageItem, false, useColors);
|
iconColor = GetIconColor(pageItem, false, useColors);
|
||||||
|
iconId = iconId2;
|
||||||
}
|
}
|
||||||
|
|
||||||
return "~" + type + "~" + pageItem.id + "~" + iconId + "~" + iconColor + "~" + name + "~" + optVal;
|
return "~" + type + "~" + pageItem.id + "~" + iconId + "~" + iconColor + "~" + name + "~" + optVal;
|
||||||
@@ -2960,6 +2964,7 @@ interface PageQR extends Page {
|
|||||||
type PageItem = {
|
type PageItem = {
|
||||||
id: string,
|
id: string,
|
||||||
icon: (string | undefined),
|
icon: (string | undefined),
|
||||||
|
icon2: (string | undefined),
|
||||||
onColor: (RGB | undefined),
|
onColor: (RGB | undefined),
|
||||||
offColor: (RGB | undefined),
|
offColor: (RGB | undefined),
|
||||||
useColor: (boolean | undefined),
|
useColor: (boolean | undefined),
|
||||||
|
|||||||
Reference in New Issue
Block a user