From 6c80eb2bd4d3de6f43c509566585635f83b6519c Mon Sep 17 00:00:00 2001 From: Ranlvor Date: Mon, 7 Dec 2020 19:57:52 +0100 Subject: [PATCH] uwap-home: Add new light in the office --- config/uwap-home/index.js | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/config/uwap-home/index.js b/config/uwap-home/index.js index 78eb16f..0a762b9 100644 --- a/config/uwap-home/index.js +++ b/config/uwap-home/index.js @@ -249,6 +249,11 @@ const config: Config = { ...topicBulbNumber("bedroom", "color_temp"), ...topicBulbNumber("hallway", "brightness"), ...topicBulbState("bedroom"), + + ...topicBulbNumber("office_window", "brightness"), + ...topicBulbNumber("office_window", "color_temp"), + ...topicBulbState("office_window"), + ...topicTasmota("fanBedroom", "sonoff-bedroom-fan"), ...topicHomeBoolean("fanBedroomAuto", "temperature-control/bedroom"), ...topicHomeNumber("fanBedroomTarget", @@ -555,6 +560,38 @@ const config: Config = { } ] }, + officeWindowLight: { + name: "Büro Fenster", + position: [173, 658], + /* eslint-disable camelcase */ + icon: svg(icons.mdiDeskLamp).color(({office_windowState}) => + (office_windowState === "on" ? hex("#00FF00") : hex("#000000"))), + /* eslint-enable camelcase */ + ui: [ + { + type: "toggle", + topic: "office_windowState", + text: "Ein/Ausschalten", + icon: svg(icons.mdiPower) + }, + { + type: "slider", + min: 0, + max: 255, + text: "Helligkeit", + icon: svg(icons.mdiBrightness7), + topic: "office_windowbrightness" + }, + { + type: "slider", + min: 250, + max: 454, + text: "Farbtemperatur", + icon: svg(icons.mdiWeatherSunsetDown), + topic: "office_windowcolor_temp" + } + ] + }, hallwayLight: { name: "Flur", position: [520, 370],