+wled office

This commit is contained in:
Ranlvor 2022-01-13 21:43:18 +01:00
parent 51d410fbd3
commit 53911db686
Signed by untrusted user who does not match committer: Ranlvor
GPG key ID: 5E12D04750EF6F8E

View file

@ -452,6 +452,17 @@ const config: Config = {
},
defaultValue: "0"
},
wled_office_brightness: {
state: {
name: "wled/office/g",
type: types.string
},
command: {
name: "wled/office",
type: types.string
},
defaultValue: "0"
},
twitch_status_uwap: {
state: {
name: "tele/twitch/uwap",
@ -769,6 +780,40 @@ const config: Config = {
}
])
},
officeLedStripWled: {
name: "Ledstreifen Büro",
position: [316, 570],
/* eslint-disable camelcase */
icon: svg(icons.mdiWhiteBalanceIridescent).color(
({wled_office_brightness}) =>
(wled_office_brightness !== "0" ? hex("#00FF00") : hex("#000000"))),
/* eslint-enable camelcase */
ui: ([
{
type: "toggle",
topic: "wled_office_brightness",
text: "Ein/Ausschalten",
icon: svg(icons.mdiPower),
on: "107",
off: "0",
toggled: (n) => parseInt(n, 10) > 0
},
{
type: "slider",
min: 1,
max: 255,
text: "Helligkeit",
icon: svg(icons.mdiBrightness7),
topic: "wled_office_brightness"
},
{
type: "link",
link: "http://192.168.0.66/",
text: "Open Webinterface",
icon: svg(icons.mdiOpenInNew)
}
])
},
hallwayLight: {
name: "Flur",
position: [520, 370],