RZL: Fix eslint warnings in utils.js

This commit is contained in:
uwap 2018-09-01 12:54:47 +02:00
parent 2801b9c491
commit fe2383f138
3 changed files with 8 additions and 8 deletions

View file

@ -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",

View file

@ -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",

View file

@ -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<ControlUI> = []): Array<ControlUI> => (
prev_ui.concat([
prevUI: Array<ControlUI> = []): Array<ControlUI> => (
prevUI.concat([
{
type: "section",
text: "Funkdose"