From bf2f5958090b2412757c3b56bd8eb200d95cb532 Mon Sep 17 00:00:00 2001 From: Ranlvor Date: Sat, 22 Feb 2020 17:21:26 +0100 Subject: [PATCH] show bulb on/off state on map icon --- config/uwap-home/index.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/config/uwap-home/index.js b/config/uwap-home/index.js index c368e51..47a9646 100644 --- a/config/uwap-home/index.js +++ b/config/uwap-home/index.js @@ -275,6 +275,8 @@ const config: Config = { name: "Schlafzimmer", position: [180, 130], icon: mdi("ceiling-light"), + iconColor: ({bedroomState}) => + (bedroomState === "on" ? hex("#00FF00") : hex("#000000")), ui: [ { type: "toggle", @@ -399,6 +401,8 @@ const config: Config = { name: "Büro", position: [210, 570], icon: mdi("ceiling-light"), + iconColor: ({officeState}) => + (officeState === "on" ? hex("#00FF00") : hex("#000000")), ui: [ { type: "toggle", @@ -420,6 +424,8 @@ const config: Config = { name: "Flur", position: [520, 370], icon: mdi("ceiling-light"), + iconColor: ({hallwayState}) => + (hallwayState === "on" ? hex("#00FF00") : hex("#000000")), ui: [ { type: "toggle", @@ -441,6 +447,8 @@ const config: Config = { name: "Flur", position: [250, 370], icon: mdi("ceiling-light"), + iconColor: ({hallway2State}) => + (hallway2State === "on" ? hex("#00FF00") : hex("#000000")), ui: [ { type: "toggle", @@ -462,6 +470,8 @@ const config: Config = { name: "Wohnzimmer", position: [450, 200], icon: mdi("ceiling-light"), + iconColor: ({livingroomState}) => + (livingroomState === "on" ? hex("#00FF00") : hex("#000000")), ui: ([ { type: "toggle",