Add speaker
This commit is contained in:
parent
a92c57c58d
commit
92b63a7d01
1 changed files with 21 additions and 3 deletions
|
|
@ -1,7 +1,7 @@
|
||||||
// @flow
|
// @flow
|
||||||
import type { Config } from "config/flowtypes";
|
import type { Config } from "config/flowtypes";
|
||||||
import * as types from "config/types";
|
import * as types from "config/types";
|
||||||
import { mdi } from "config/icon";
|
import { mdi, rawMdi } from "config/icon";
|
||||||
import { hex } from "config/colors";
|
import { hex } from "config/colors";
|
||||||
|
|
||||||
const topicBulb = (bulb: string, argument: string) => ({
|
const topicBulb = (bulb: string, argument: string) => ({
|
||||||
|
|
@ -131,7 +131,8 @@ const config: Config = {
|
||||||
},
|
},
|
||||||
defaultValue: "OFF"
|
defaultValue: "OFF"
|
||||||
},
|
},
|
||||||
...topicHomeBoolean("livingroomKodiControlled", "bulb/livingroom/kodi-controlled"),
|
...topicHomeBoolean("livingroomKodiControlled",
|
||||||
|
"bulb/livingroom/kodi-controlled"),
|
||||||
...topicHomeBoolean("bedroomWakeup", "wakeup"),
|
...topicHomeBoolean("bedroomWakeup", "wakeup"),
|
||||||
bedroomBrightness: {
|
bedroomBrightness: {
|
||||||
state: {
|
state: {
|
||||||
|
|
@ -197,7 +198,8 @@ const config: Config = {
|
||||||
type: (value) => JSON.stringify({ state: value.toString() })
|
type: (value) => JSON.stringify({ state: value.toString() })
|
||||||
},
|
},
|
||||||
defaultValue: "OFF"
|
defaultValue: "OFF"
|
||||||
}
|
},
|
||||||
|
...topicTasmota("speakerOffice", "sonoff-office-speaker")
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
controls: {
|
controls: {
|
||||||
|
|
@ -257,6 +259,22 @@ const config: Config = {
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
officeSpeaker: {
|
||||||
|
name: "Lautsprecher",
|
||||||
|
position: [550, 400],
|
||||||
|
icon: ({speakerOfficeState}) =>
|
||||||
|
(speakerOfficeState === "on" ? rawMdi("volume-high") : rawMdi("volume-off")),
|
||||||
|
iconColor: ({speakerOfficeState}) =>
|
||||||
|
(speakerOfficeState === "on" ? hex("#00FF00") : hex("#000000")),
|
||||||
|
ui: [
|
||||||
|
{
|
||||||
|
type: "toggle",
|
||||||
|
topic: "speakerOfficeState",
|
||||||
|
text: "Ein/Ausschalten",
|
||||||
|
icon: mdi("power")
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
officeFan: {
|
officeFan: {
|
||||||
name: "Lüftung Büro",
|
name: "Lüftung Büro",
|
||||||
position: [600, 400],
|
position: [600, 400],
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue