From ee4800d087e923248d8a7a36cd9a1d98c27f3d39 Mon Sep 17 00:00:00 2001 From: Ranlvor Date: Tue, 10 Nov 2020 23:21:22 +0100 Subject: [PATCH] Add heater diningroom --- config/uwap-home/index.js | 51 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) diff --git a/config/uwap-home/index.js b/config/uwap-home/index.js index 0e1e269..0e8481f 100644 --- a/config/uwap-home/index.js +++ b/config/uwap-home/index.js @@ -181,6 +181,17 @@ const config: Config = { }, defaultValue: "253" }, + heaterDiningroomTsoll: { + state: { + name: "tele/home-rust/fritzbox/device/diningroom/tsoll", + type: (msg) => (msg.toString().split(" ")[1]/2) + }, + command: { + name: "home-rust/fritzbox/device/diningroom/tsoll/set", + type: (msg) => ((msg * 2).toString()) + }, + defaultValue: 126.5 + }, heaterOfficeNachtabsenkung: { state: { name: "home-rust/temperature-control/office_heating/heat_request/4", @@ -539,6 +550,46 @@ const config: Config = { } ] }, + diningroomHeater: { + name: "Heizung Esszimmer", + position: [410, 658], + icon: withState(({heaterDiningroomTsoll}) => ( + heaterDiningroomTsoll === 126.5 ? + svg(icons.mdiRadiatorDisabled) : svg(icons.mdiRadiator) + )), + ui: [ + { + type: "toggle", + topic: "heaterDiningroomTsoll", + text: "Volle Power", + icon: svg(icons.mdiRadiator), + on: 127, + off: 25 + }, + { + type: "toggle", + topic: "heaterDiningroomTsoll", + text: "Ausschalten", + icon: svg(icons.mdiRadiatorDisabled), + on: 126.5, + off: 25 + }, + { + type: "slider", + min: 8, + max: 28, + step: 0.5, + text: "Zieltemperatur", + icon: svg(icons.mdiOilTemperature), + topic: "heaterDiningroomTsoll", + marks: [ + { value: 8, label: "8°C" }, + { value: 18, label: "18°C" }, + { value: 28, label: "28°C" } + ] + } + ] + }, pi: { name: "Pi", position: [550, 75],