+Projector
This commit is contained in:
parent
5a99952edb
commit
8fa2643eac
1 changed files with 47 additions and 0 deletions
|
|
@ -129,6 +129,31 @@ const config : Config = {
|
||||||
defaultValue: "OFF",
|
defaultValue: "OFF",
|
||||||
values: { on: "ON", off: "OFF" }
|
values: { on: "ON", off: "OFF" }
|
||||||
},
|
},
|
||||||
|
projector: {
|
||||||
|
state: "/service/beamer/state",
|
||||||
|
command: "/service/beamer/command",
|
||||||
|
defaultValue: "unavailable",
|
||||||
|
values: {on: "ON", off: "OFF"},
|
||||||
|
type: msg => {
|
||||||
|
switch (msg.toString()) {
|
||||||
|
case "START_UP":
|
||||||
|
case "START_UP_LAMP":
|
||||||
|
return "transient_on"
|
||||||
|
case "COOLING":
|
||||||
|
case "COOLING2":
|
||||||
|
return "transient_off"
|
||||||
|
case "POWER_ON":
|
||||||
|
return "on"
|
||||||
|
case "STANDBY":
|
||||||
|
return "off"
|
||||||
|
case "unknown":
|
||||||
|
return "unknown"
|
||||||
|
|
||||||
|
default:
|
||||||
|
return msg.toString()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
printer_3d_status: {
|
printer_3d_status: {
|
||||||
state: "/service/ultimaker/state",
|
state: "/service/ultimaker/state",
|
||||||
command: "",
|
command: "",
|
||||||
|
|
@ -295,6 +320,28 @@ const config : Config = {
|
||||||
}
|
}
|
||||||
])
|
])
|
||||||
},
|
},
|
||||||
|
projector: {
|
||||||
|
name: "Beamer",
|
||||||
|
position: [415, 590],
|
||||||
|
icon: "projector",
|
||||||
|
iconColor: ({projector}) =>
|
||||||
|
({
|
||||||
|
transient_on: hex("#b3b300"),
|
||||||
|
transient_off: hex("#b3b300"),
|
||||||
|
on: hex("#00ff00"),
|
||||||
|
off: hex("#000000"),
|
||||||
|
unknown: hex("#888888"),
|
||||||
|
})[projector],
|
||||||
|
ui: [
|
||||||
|
{
|
||||||
|
type: "toggle",
|
||||||
|
text: "Beamer",
|
||||||
|
topic: "projector",
|
||||||
|
toggled: val => val == "transient_on" || val == "on",
|
||||||
|
icon: "power"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
artnet: {
|
artnet: {
|
||||||
name: "Artnet",
|
name: "Artnet",
|
||||||
position: [535,480],
|
position: [535,480],
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue