diff --git a/config/rzl/index.js b/config/rzl/index.js index 99d083d..69af447 100644 --- a/config/rzl/index.js +++ b/config/rzl/index.js @@ -186,7 +186,7 @@ const config: Config = { name: "Snackbar", position: [510, 500], icon: mdi("fridge"), - iconColor: tasmota.icon_color("snackbar", hex("#E20074")), + iconColor: tasmota.iconColor("snackbar", hex("#E20074")), ui: [ { type: "toggle", @@ -337,7 +337,7 @@ const config: Config = { name: "Infoscreen", position: [255, 495], icon: mdi("television-guide flip-v"), - iconColor: tasmota.icon_color("infoscreen", hex("#4444FF")), + iconColor: tasmota.iconColor("infoscreen", hex("#4444FF")), ui: [ { type: "toggle", diff --git a/config/rzl/olymp.js b/config/rzl/olymp.js index a4d730a..0ed8822 100644 --- a/config/rzl/olymp.js +++ b/config/rzl/olymp.js @@ -49,7 +49,7 @@ export const controls: Controls = { name: "LED Olymp", position: [196, 154], icon: mdi("white-balance-iridescent rotate-45"), - iconColor: tasmota.icon_color("ledOlymp", rainbow), + iconColor: tasmota.iconColor("ledOlymp", rainbow), ui: [ { type: "toggle", @@ -93,7 +93,7 @@ export const controls: Controls = { name: "Drucker", position: [335, 90], icon: mdi("printer"), - iconColor: tasmota.icon_color("printerOlymp"), + iconColor: tasmota.iconColor("printerOlymp"), ui: [ { type: "toggle", diff --git a/config/rzl/utils.js b/config/rzl/utils.js index 413b06c..2fbe615 100644 --- a/config/rzl/utils.js +++ b/config/rzl/utils.js @@ -25,13 +25,13 @@ export const tasmota = { defaultValue: "offline" } }), - icon_color: (name: string, on_color: Color = hex("#00FF00")) => + iconColor: (name: string, onColor: Color = hex("#00FF00")) => (state: State) => { if (state[`${name}_online`] === "offline") { return hex("#888888"); } else { if (state[name] === "on") { - return on_color; + return onColor; } else { return hex("#000000"); } @@ -99,8 +99,8 @@ export const tradfri = { }; const esperStatistics = (name: string, - prev_ui: Array = []): Array => ( - prev_ui.concat([ + prevUI: Array = []): Array => ( + prevUI.concat([ { type: "section", text: "Funkdose"