Add officeLight

This commit is contained in:
Ranlvor 2019-10-18 01:53:38 +02:00
parent 2a268c41a1
commit be9077b61c
Signed by untrusted user who does not match committer: Ranlvor
GPG key ID: 5E12D04750EF6F8E

View file

@ -217,6 +217,31 @@ const config: Config = {
},
defaultValue: "OFF"
},
officeBrightness: {
state: {
name: "home-rust/bulb/office/brightness",
type: types.string
},
command: {
name: "zigbee2mqtt/bulb_office/set",
type: (value) => JSON.stringify({ brightness: value.toString() })
},
defaultValue: "0"
},
officeState: {
state: {
name: "home-rust/bulb/office/state",
type: types.option({
OFF: "off",
ON: "on"
})
},
command: {
name: "zigbee2mqtt/bulb_office/set",
type: (value) => JSON.stringify({ state: value.toString() })
},
defaultValue: "OFF"
},
...topicTasmota("speakerOffice", "sonoff-office-speaker")
}
],
@ -345,6 +370,27 @@ const config: Config = {
}
]
},
officeLight: {
name: "Büro",
position: [210, 570],
icon: mdi("ceiling-light"),
ui: [
{
type: "toggle",
topic: "officeState",
text: "Ein/Ausschalten",
icon: mdi("power")
},
{
type: "slider",
min: 0,
max: 255,
text: "Helligkeit",
icon: mdi("brightness-7"),
topic: "officeBrightness"
}
]
},
hallwayLight: {
name: "Flur",
position: [520, 370],