next round

This commit is contained in:
Ranlvor 2018-08-11 23:40:52 +02:00
parent 172dc5d0c5
commit 90079cb06d
Signed by untrusted user who does not match committer: Ranlvor
GPG key ID: 5E12D04750EF6F8E

View file

@ -64,14 +64,14 @@ export const tasmota = {
defaultValue: "offline"
},
}),
icon_color: (name: string, on_color: Color = hex("#00FF00")) => function (state: State) {
if (state[`${name}_online`] == "offline") {
return hex("#888888")
icon_color: (name: string, on_color: Color = hex("#00FF00")) => (state: State) => {
if (state[`${name}_online`] === "offline") {
return hex("#888888");
} else {
if (state[name] == "on") {
return on_color
if (state[name] === "on") {
return on_color;
} else {
return hex("#000000")
return hex("#000000");
}
}
}