+LED-Streifen Snackbar (#75)

* +LED-Streifen Snackbar
This commit is contained in:
Ranlvor 2018-09-02 04:53:04 +02:00 committed by uwap
parent e3c11c19cd
commit 3375c798dc
2 changed files with 93 additions and 3 deletions

View file

@ -20,14 +20,15 @@ export const tasmota = {
[`${name}_online`]: {
state: {
name: `tele/sonoff${id}/LWT`,
type: types.string
type: types.option({ Online: "on", online: "on",
Offline: "off", offline: "off" })
},
defaultValue: "offline"
defaultValue: "off"
}
}),
iconColor: (name: string, onColor: Color = hex("#00FF00")) =>
(state: State) => {
if (state[`${name}_online`] === "offline") {
if (state[`${name}_online`] === "off") {
return hex("#888888");
} else {
if (state[name] === "on") {