From 81d8840c32c6292a489052a522ee9e981a8acb1c Mon Sep 17 00:00:00 2001 From: uwap Date: Sun, 17 Sep 2017 21:10:03 +0200 Subject: [PATCH] Add door status --- src/config.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/config.js b/src/config.js index e3409cd..2f9d41b 100644 --- a/src/config.js +++ b/src/config.js @@ -45,6 +45,12 @@ const config : Config = { command: "/service/openhab/in/pca301_rundumleuchte/command", value: "OFF", values: { on: "ON", off: "OFF" } + }, + door_status: { + state: "/service/status", + command: "", + value: "\"closed\"", + values: { on: "\"open\"", off: "\"closed\"" } } }, controls: { @@ -162,6 +168,13 @@ const config : Config = { topic: "rundumleuchte" } ] + }, + door: { + name: "Tür", + position: [480,20], + icon: "swap_vert", + iconColor: state => state.door_status == "on" ? "#00FF00" : "#FF0000", + ui: [] } } };