RZL: Fix eslint warnings in utils.js
This commit is contained in:
parent
2801b9c491
commit
fe2383f138
3 changed files with 8 additions and 8 deletions
|
|
@ -186,7 +186,7 @@ const config: Config = {
|
||||||
name: "Snackbar",
|
name: "Snackbar",
|
||||||
position: [510, 500],
|
position: [510, 500],
|
||||||
icon: mdi("fridge"),
|
icon: mdi("fridge"),
|
||||||
iconColor: tasmota.icon_color("snackbar", hex("#E20074")),
|
iconColor: tasmota.iconColor("snackbar", hex("#E20074")),
|
||||||
ui: [
|
ui: [
|
||||||
{
|
{
|
||||||
type: "toggle",
|
type: "toggle",
|
||||||
|
|
@ -337,7 +337,7 @@ const config: Config = {
|
||||||
name: "Infoscreen",
|
name: "Infoscreen",
|
||||||
position: [255, 495],
|
position: [255, 495],
|
||||||
icon: mdi("television-guide flip-v"),
|
icon: mdi("television-guide flip-v"),
|
||||||
iconColor: tasmota.icon_color("infoscreen", hex("#4444FF")),
|
iconColor: tasmota.iconColor("infoscreen", hex("#4444FF")),
|
||||||
ui: [
|
ui: [
|
||||||
{
|
{
|
||||||
type: "toggle",
|
type: "toggle",
|
||||||
|
|
|
||||||
|
|
@ -49,7 +49,7 @@ export const controls: Controls = {
|
||||||
name: "LED Olymp",
|
name: "LED Olymp",
|
||||||
position: [196, 154],
|
position: [196, 154],
|
||||||
icon: mdi("white-balance-iridescent rotate-45"),
|
icon: mdi("white-balance-iridescent rotate-45"),
|
||||||
iconColor: tasmota.icon_color("ledOlymp", rainbow),
|
iconColor: tasmota.iconColor("ledOlymp", rainbow),
|
||||||
ui: [
|
ui: [
|
||||||
{
|
{
|
||||||
type: "toggle",
|
type: "toggle",
|
||||||
|
|
@ -93,7 +93,7 @@ export const controls: Controls = {
|
||||||
name: "Drucker",
|
name: "Drucker",
|
||||||
position: [335, 90],
|
position: [335, 90],
|
||||||
icon: mdi("printer"),
|
icon: mdi("printer"),
|
||||||
iconColor: tasmota.icon_color("printerOlymp"),
|
iconColor: tasmota.iconColor("printerOlymp"),
|
||||||
ui: [
|
ui: [
|
||||||
{
|
{
|
||||||
type: "toggle",
|
type: "toggle",
|
||||||
|
|
|
||||||
|
|
@ -25,13 +25,13 @@ export const tasmota = {
|
||||||
defaultValue: "offline"
|
defaultValue: "offline"
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
icon_color: (name: string, on_color: Color = hex("#00FF00")) =>
|
iconColor: (name: string, onColor: Color = hex("#00FF00")) =>
|
||||||
(state: State) => {
|
(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 onColor;
|
||||||
} else {
|
} else {
|
||||||
return hex("#000000");
|
return hex("#000000");
|
||||||
}
|
}
|
||||||
|
|
@ -99,8 +99,8 @@ export const tradfri = {
|
||||||
};
|
};
|
||||||
|
|
||||||
const esperStatistics = (name: string,
|
const esperStatistics = (name: string,
|
||||||
prev_ui: Array<ControlUI> = []): Array<ControlUI> => (
|
prevUI: Array<ControlUI> = []): Array<ControlUI> => (
|
||||||
prev_ui.concat([
|
prevUI.concat([
|
||||||
{
|
{
|
||||||
type: "section",
|
type: "section",
|
||||||
text: "Funkdose"
|
text: "Funkdose"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue