next round
This commit is contained in:
parent
172dc5d0c5
commit
90079cb06d
1 changed files with 6 additions and 6 deletions
|
|
@ -64,14 +64,14 @@ export const tasmota = {
|
||||||
defaultValue: "offline"
|
defaultValue: "offline"
|
||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
icon_color: (name: string, on_color: Color = hex("#00FF00")) => function (state: State) {
|
icon_color: (name: string, on_color: Color = hex("#00FF00")) => (state: State) => {
|
||||||
if (state[`${name}_online`] == "offline") {
|
if (state[`${name}_online`] === "offline") {
|
||||||
return hex("#888888")
|
return hex("#888888");
|
||||||
} else {
|
} else {
|
||||||
if (state[name] == "on") {
|
if (state[name] === "on") {
|
||||||
return on_color
|
return on_color;
|
||||||
} else {
|
} else {
|
||||||
return hex("#000000")
|
return hex("#000000");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue