From 90079cb06d66ce98cf231da867e63117b24a4218 Mon Sep 17 00:00:00 2001 From: Ranlvor Date: Sat, 11 Aug 2018 23:40:52 +0200 Subject: [PATCH] next round --- config/rzl/utils.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/config/rzl/utils.js b/config/rzl/utils.js index 11b96c6..76a1a0e 100644 --- a/config/rzl/utils.js +++ b/config/rzl/utils.js @@ -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"); } } }