show bulb on/off state on map icon

This commit is contained in:
Ranlvor 2020-02-22 17:21:26 +01:00
parent 54c44b0438
commit bf2f595809
Signed by untrusted user who does not match committer: Ranlvor
GPG key ID: 5E12D04750EF6F8E

View file

@ -275,6 +275,8 @@ const config: Config = {
name: "Schlafzimmer", name: "Schlafzimmer",
position: [180, 130], position: [180, 130],
icon: mdi("ceiling-light"), icon: mdi("ceiling-light"),
iconColor: ({bedroomState}) =>
(bedroomState === "on" ? hex("#00FF00") : hex("#000000")),
ui: [ ui: [
{ {
type: "toggle", type: "toggle",
@ -399,6 +401,8 @@ const config: Config = {
name: "Büro", name: "Büro",
position: [210, 570], position: [210, 570],
icon: mdi("ceiling-light"), icon: mdi("ceiling-light"),
iconColor: ({officeState}) =>
(officeState === "on" ? hex("#00FF00") : hex("#000000")),
ui: [ ui: [
{ {
type: "toggle", type: "toggle",
@ -420,6 +424,8 @@ const config: Config = {
name: "Flur", name: "Flur",
position: [520, 370], position: [520, 370],
icon: mdi("ceiling-light"), icon: mdi("ceiling-light"),
iconColor: ({hallwayState}) =>
(hallwayState === "on" ? hex("#00FF00") : hex("#000000")),
ui: [ ui: [
{ {
type: "toggle", type: "toggle",
@ -441,6 +447,8 @@ const config: Config = {
name: "Flur", name: "Flur",
position: [250, 370], position: [250, 370],
icon: mdi("ceiling-light"), icon: mdi("ceiling-light"),
iconColor: ({hallway2State}) =>
(hallway2State === "on" ? hex("#00FF00") : hex("#000000")),
ui: [ ui: [
{ {
type: "toggle", type: "toggle",
@ -462,6 +470,8 @@ const config: Config = {
name: "Wohnzimmer", name: "Wohnzimmer",
position: [450, 200], position: [450, 200],
icon: mdi("ceiling-light"), icon: mdi("ceiling-light"),
iconColor: ({livingroomState}) =>
(livingroomState === "on" ? hex("#00FF00") : hex("#000000")),
ui: ([ ui: ([
{ {
type: "toggle", type: "toggle",