uwap-home, heater diningroom: show boost/window open state

This commit is contained in:
Ranlvor 2020-12-19 16:19:42 +01:00
parent 01ed36e5be
commit a6aef2ee9a
Signed by untrusted user who does not match committer: Ranlvor
GPG key ID: 5E12D04750EF6F8E

View file

@ -248,6 +248,34 @@ const config: Config = {
}, },
defaultValue: "126.5" defaultValue: "126.5"
}, },
heaterdiningroomWindowEnd: {
state: {
name: "tele/home-rust/fritzbox/device/diningroom",
type: (msg) => {
const json = JSON.parse(msg.toString());
if (!json || !json["windowopenactiveendtime"]) {
return "inactive";
} else {
return new Date(json["windowopenactiveendtime"] * 1000).toLocaleTimeString();
}
}
},
defaultValue: "unavailable"
},
heaterdiningroomBoostEnd: {
state: {
name: "tele/home-rust/fritzbox/device/diningroom",
type: (msg) => {
const json = JSON.parse(msg.toString());
if (!json || !json["boostactiveendtime"]) {
return "inactive";
} else {
return new Date(json["windowopenactiveendtime"] * 1000).toLocaleTimeString();
}
}
},
defaultValue: "unavailable"
},
heaterBedroomTsoll: { heaterBedroomTsoll: {
state: { state: {
name: "tele/home-rust/fritzbox/device/bedroom/tsoll", name: "tele/home-rust/fritzbox/device/bedroom/tsoll",
@ -747,6 +775,18 @@ const config: Config = {
{ value: 18, label: "18°C" }, { value: 18, label: "18°C" },
{ value: 28, label: "28°C" } { value: 28, label: "28°C" }
] ]
},
{
type: "text",
text: "Window open mode till",
icon: svg(icons.mdiSortClockAscending),
topic: "heaterdiningroomWindowEnd"
},
{
type: "text",
text: "Boost mode till",
icon: svg(icons.mdiSortClockDescending),
topic: "heaterdiningroomBoostEnd"
} }
] ]
}, },