From f06d624f9f0d2504165cd61ca4b8f7aed55d0419 Mon Sep 17 00:00:00 2001 From: Ranlvor Date: Sun, 2 Sep 2018 03:10:19 +0200 Subject: [PATCH] uglify stuff to make the linter happy --- config/rzl/index.js | 11 ++++++----- config/rzl/utils.js | 5 +++-- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/config/rzl/index.js b/config/rzl/index.js index 6b6f580..8bd208d 100644 --- a/config/rzl/index.js +++ b/config/rzl/index.js @@ -64,7 +64,8 @@ const config: Config = { snackbarLedOnline: { state: { name: "tele/tasmota-snackbar/LWT", - type: types.option({ Online: "on", online: "on", Offline: "off", offline: "off" }) + type: types.option({ Online: "on", online: "on", + Offline: "off", offline: "off" }) }, defaultValue: "off" }, @@ -262,7 +263,7 @@ const config: Config = { "12": "Fire Pattern" }, icon: mdi("settings"), - enableCondition: ({ snackbarLedOnline }) => snackbarLedOnline == "on" + enableCondition: ({ snackbarLedOnline }) => snackbarLedOnline === "on" }, { type: "slider", @@ -271,7 +272,7 @@ const config: Config = { min: 0, max: 100, icon: mdi("brightness-7"), - enableCondition: ({ snackbarLedOnline }) => snackbarLedOnline == "on" + enableCondition: ({ snackbarLedOnline }) => snackbarLedOnline === "on" }, { type: "slider", @@ -280,8 +281,8 @@ const config: Config = { min: 0, max: 20, icon: mdi("speedometer"), - enableCondition: ({ snackbarLedOnline }) => snackbarLedOnline == "on" - }, + enableCondition: ({ snackbarLedOnline }) => snackbarLedOnline === "on" + } ] }, twinkle: { diff --git a/config/rzl/utils.js b/config/rzl/utils.js index c5f4730..d189a38 100644 --- a/config/rzl/utils.js +++ b/config/rzl/utils.js @@ -20,10 +20,11 @@ export const tasmota = { [`${name}_online`]: { state: { name: `tele/sonoff${id}/LWT`, - type: types.option({ Online: "on", online: "on", Offline: "off", offline: "off" }) + type: types.option({ Online: "on", online: "on", + Offline: "off", offline: "off" }) }, defaultValue: "off" - }, + } }), iconColor: (name: string, onColor: Color = hex("#00FF00")) => (state: State) => {