Add office fan

This commit is contained in:
Ranlvor 2019-05-20 20:56:05 +02:00
parent fa03e0061f
commit da7161c0dd
Signed by untrusted user who does not match committer: Ranlvor
GPG key ID: 5E12D04750EF6F8E

View file

@ -183,6 +183,31 @@ const config: Config = {
}, },
defaultValue: "OFF" defaultValue: "OFF"
}, },
fanOfficeState: {
state: {
name: "stat/sonoff-office-fan/POWER",
type: types.option({
OFF: "off",
ON: "on"
})
},
command: {
name: "cmnd/sonoff-office-fan/POWER",
type: types.string
},
defaultValue: "OFF"
},
fanOfficeAuto: {
state: {
name: "home-rust/temperature-control/office",
type: types.option({ true: "on", false: "off" })
},
command: {
name: "home-rust/temperature-control/office/set",
type: types.option({ on: "true", off: "false" })
},
defaultValue: "OFF"
},
hallwayBrightness: { hallwayBrightness: {
state: { state: {
name: "home-rust/bulb/hallway/brightness", name: "home-rust/bulb/hallway/brightness",
@ -267,9 +292,30 @@ const config: Config = {
} }
] ]
}, },
officeFan: {
name: "Lüftung Büro",
position: [600, 400],
icon: mdi("fan"),
iconColor: ({fanOfficeState}) =>
(fanOfficeState === "on" ? hex("#00FF00") : hex("#000000")),
ui: [
{
type: "toggle",
topic: "fanOfficeState",
text: "Ein/Ausschalten",
icon: mdi("power")
},
{
type: "toggle",
topic: "fanOfficeAuto",
text: "Automatik",
icon: mdi("air-conditioner")
}
]
},
hallwayLight: { hallwayLight: {
name: "Flur", name: "Flur",
position: [500, 200], position: [400, 200],
icon: mdi("ceiling-light"), icon: mdi("ceiling-light"),
ui: [ ui: [
{ {