uwap-home: Add kittchen temperature warning

This commit is contained in:
Ranlvor 2020-12-07 20:20:21 +01:00
parent 57655b0f66
commit a25d7cc01d
Signed by untrusted user who does not match committer: Ranlvor
GPG key ID: 5E12D04750EF6F8E

View file

@ -205,6 +205,15 @@ const config: Config = {
"bulb/livingroom/kodi-controlled"),
...topicHomeBoolean("bedroomWakeup", "wakeup"),
...topicHomeBoolean("lueftenHint", "lueften"),
...topicHomeNumber("temperatureWarningKitchen",
"temperature-warning/kitchen/setpoint", 15.0),
temperatureKitchen: {
state: {
name: "zigbee2mqtt/sensor_kitchen/temperature",
type: types.string
},
defaultValue: "0"
},
nasPower: {
state: {
name: "nas/online",
@ -645,6 +654,34 @@ const config: Config = {
}
]
},
temperatureWarningKitchen: {
name: "Untertemperatur-Warnung",
position: [625, 660],
icon: withState((s) => (
( parseFloat(s["temperatureKitchen"])
< parseFloat(s["temperatureWarningKitchen"])
)
? svg(icons.mdiThermometerAlert).color(hex("#FF0000"))
: svg(icons.mdiThermometer)
)),
ui: [
{
type: "slider",
min: 0,
max: 20,
step: 1,
text: "Schwellwert",
icon: svg(icons.mdiThermometerChevronDown),
topic: "temperatureWarningKitchen",
marks: [
{ value: 0, label: "0°C" },
{ value: 15, label: "15°C" },
{ value: 20, label: "20°C" }
]
}
]
},
diningroomLight: {
name: "Esszimmer",
position: [410, 570],