From e0b64f1bfef59de7ebeb2c441b45a90daeddeced Mon Sep 17 00:00:00 2001 From: Ranlvor Date: Sun, 23 Feb 2020 19:33:47 +0100 Subject: [PATCH] Add icon for nas --- config/uwap-home/index.js | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/config/uwap-home/index.js b/config/uwap-home/index.js index 47a9646..8a6328f 100644 --- a/config/uwap-home/index.js +++ b/config/uwap-home/index.js @@ -145,6 +145,17 @@ const config: Config = { }, defaultValue: "OFF" }, + nasPower: { + state: { + name: "nas/online", + type: types.string + }, + command: { + name: "home-rust/wake/nas", + type: types.string + }, + defaultValue: "OFF" + }, ...topicHomeBoolean("livingroomKodiControlled", "bulb/livingroom/kodi-controlled"), ...topicHomeBoolean("bedroomWakeup", "wakeup"), @@ -466,6 +477,21 @@ const config: Config = { } ] }, + nas: { + name: "NAS", + position: [550, 100], + icon: mdi("nas"), + iconColor: ({nasPower}) => + (nasPower === "on" ? hex("#00FF00") : hex("#000000")), + ui: [ + { + type: "toggle", + topic: "nasPower", + text: "Einschalten", + icon: mdi("power") + } + ] + }, livingroomLight: { name: "Wohnzimmer", position: [450, 200],