Fix eslint errors
This commit is contained in:
parent
856aab41ad
commit
8376f404e4
10 changed files with 44 additions and 46 deletions
|
|
@ -4,7 +4,7 @@ import * as types from "config/types";
|
|||
import { hex, rainbow } from "config/colors";
|
||||
import { svg, withState } from "config/icon";
|
||||
import { esper, tasmota } from "./utils";
|
||||
import * as icons from "@mdi/js"
|
||||
import * as icons from "@mdi/js";
|
||||
|
||||
import * as onkyo from "./onkyo";
|
||||
import * as olymp from "./olymp";
|
||||
|
|
@ -277,7 +277,7 @@ const config: Config = {
|
|||
name: "LED Stahlträger",
|
||||
position: [340, 590],
|
||||
icon: svg(icons.mdiWhiteBalanceIridescent).color(({ledStahltraeger}) =>
|
||||
ledStahltraeger === "on" ? rainbow : hex("#000000")),
|
||||
(ledStahltraeger === "on" ? rainbow : hex("#000000"))),
|
||||
ui: [
|
||||
{
|
||||
type: "toggle",
|
||||
|
|
@ -353,8 +353,8 @@ const config: Config = {
|
|||
name: "Twinkle",
|
||||
position: [530, 560],
|
||||
icon: withState(({twinkle}) =>
|
||||
twinkle === "on" ? svg(icons.mdiLedOn).flipV().color(rainbow)
|
||||
: svg(icons.mdiLedOff).flipV()
|
||||
(twinkle === "on" ? svg(icons.mdiLedOn).flipV().color(rainbow)
|
||||
: svg(icons.mdiLedOff).flipV())
|
||||
),
|
||||
ui: [
|
||||
{
|
||||
|
|
@ -369,7 +369,7 @@ const config: Config = {
|
|||
name: "Ventilator",
|
||||
position: [530, 440],
|
||||
icon: svg(icons.mdiFan).color(({fan}) =>
|
||||
fan === "on" ? hex("#00FF00") : hex("#000000")),
|
||||
(fan === "on" ? hex("#00FF00") : hex("#000000"))),
|
||||
ui: [
|
||||
{
|
||||
type: "toggle",
|
||||
|
|
@ -396,7 +396,7 @@ const config: Config = {
|
|||
name: "Fliegenbratgerät",
|
||||
position: [450, 570],
|
||||
icon: svg(icons.mdiFire).color(({flyfry}) =>
|
||||
flyfry === "on" ? hex("#6666FF") : hex("#000000")),
|
||||
(flyfry === "on" ? hex("#6666FF") : hex("#000000"))),
|
||||
ui: esper.statistics("flyfry", [
|
||||
{
|
||||
type: "toggle",
|
||||
|
|
@ -431,7 +431,7 @@ const config: Config = {
|
|||
name: "Lötarbeitsplatz",
|
||||
position: [205, 455],
|
||||
icon: svg(icons.mdiEyedropperVariant).color(({loetarbeitsplatz4}) =>
|
||||
loetarbeitsplatz4 === "on" ? hex("#FF0000") : hex("#000000")),
|
||||
(loetarbeitsplatz4 === "on" ? hex("#FF0000") : hex("#000000"))),
|
||||
ui: [
|
||||
{
|
||||
type: "text",
|
||||
|
|
@ -445,7 +445,7 @@ const config: Config = {
|
|||
name: "Lötarbeitsplatz",
|
||||
position: [205, 405],
|
||||
icon: svg(icons.mdiEyedropperVariant).color(({loetarbeitsplatz4}) =>
|
||||
loetarbeitsplatz4 === "on" ? hex("#FF0000") : hex("#000000")),
|
||||
(loetarbeitsplatz4 === "on" ? hex("#FF0000") : hex("#000000"))),
|
||||
ui: [
|
||||
{
|
||||
type: "text",
|
||||
|
|
@ -459,7 +459,7 @@ const config: Config = {
|
|||
name: "Tür",
|
||||
position: [455, 350],
|
||||
icon: svg(icons.mdiSwapVertical).color(({doorStatus}) =>
|
||||
doorStatus === "on" ? hex("#00FF00") : hex("#FF0000")),
|
||||
(doorStatus === "on" ? hex("#00FF00") : hex("#FF0000"))),
|
||||
ui: [
|
||||
{
|
||||
type: "link",
|
||||
|
|
@ -526,8 +526,8 @@ const config: Config = {
|
|||
name: "Pilze",
|
||||
position: [48, 499],
|
||||
icon: withState(({pilze}) =>
|
||||
pilze === "on" ? svg(icons.mdiLedOn) : svg(icons.mdiLedOff)).color(
|
||||
tasmota.iconColor("pilze", rainbow)),
|
||||
(pilze === "on" ? svg(icons.mdiLedOn) : svg(icons.mdiLedOff))).color(
|
||||
tasmota.iconColor("pilze", rainbow)),
|
||||
ui: [
|
||||
{
|
||||
type: "toggle",
|
||||
|
|
@ -611,8 +611,8 @@ const config: Config = {
|
|||
name: "Strom Fablab",
|
||||
position: [613, 537],
|
||||
icon: withState(({nebenraumPowerStatus}) =>
|
||||
nebenraumPowerStatus === "on" ? svg(icons.mdiFlash).color(hex("#00FF00"))
|
||||
: svg(icons.mdiFlashOff)),
|
||||
(nebenraumPowerStatus === "on" ?
|
||||
svg(icons.mdiFlash).color(hex("#00FF00")) : svg(icons.mdiFlashOff))),
|
||||
ui: [
|
||||
{
|
||||
type: "text",
|
||||
|
|
@ -627,7 +627,8 @@ const config: Config = {
|
|||
position: [1413, 500],
|
||||
icon: svg(icons.mdiPool).color(
|
||||
({whirlpoolBubbles}) =>
|
||||
parseInt(whirlpoolBubbles, 10) > 0 ? hex("#00ff00") : hex("#000000")),
|
||||
(parseInt(whirlpoolBubbles, 10) > 0 ? hex("#00ff00")
|
||||
: hex("#000000"))),
|
||||
ui: [
|
||||
{
|
||||
type: "text",
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import { svg, mdiBattery } from "config/icon";
|
|||
import { hex } from "config/colors";
|
||||
import * as types from "config/types";
|
||||
import { floalt, tradfri, tasmota } from "./utils";
|
||||
import * as icons from "@mdi/js"
|
||||
import * as icons from "@mdi/js";
|
||||
|
||||
export const topics: Topics = {
|
||||
//Kuechen-Floalts
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import { svg } from "config/icon";
|
|||
import { hex, rainbow } from "config/colors";
|
||||
import * as types from "config/types";
|
||||
import { tasmota, esper } from "./utils";
|
||||
import * as icons from "@mdi/js"
|
||||
import * as icons from "@mdi/js";
|
||||
|
||||
export const topics: Topics = {
|
||||
...tasmota.topics("8", "ledOlymp"),
|
||||
|
|
@ -63,7 +63,7 @@ export const controls: Controls = {
|
|||
name: "Videospiele",
|
||||
position: [100, 100],
|
||||
icon: svg(icons.mdiGamepadVariant).color(({videogames}) =>
|
||||
videogames === "on" ? hex("#00FF00") : hex("#000000")),
|
||||
(videogames === "on" ? hex("#00FF00") : hex("#000000"))),
|
||||
ui: [
|
||||
{
|
||||
type: "toggle",
|
||||
|
|
@ -77,7 +77,7 @@ export const controls: Controls = {
|
|||
name: "Rechner",
|
||||
position: [297, 90],
|
||||
icon: svg(icons.mdiDesktopClassic).color(({olympPC}) =>
|
||||
olympPC === "on" ? hex("#00FF00") : hex("#000000")),
|
||||
(olympPC === "on" ? hex("#00FF00") : hex("#000000"))),
|
||||
ui: [
|
||||
{
|
||||
type: "toggle",
|
||||
|
|
@ -91,7 +91,7 @@ export const controls: Controls = {
|
|||
name: "Rundumleuchte",
|
||||
position: [310, 275],
|
||||
icon: svg(icons.mdiAlarmLight).color(({rundumleuchte}) =>
|
||||
rundumleuchte === "on" ? hex("#F0DF10") : hex("#000000")),
|
||||
(rundumleuchte === "on" ? hex("#F0DF10") : hex("#000000"))),
|
||||
ui: [
|
||||
{
|
||||
type: "toggle",
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import type { ControlUI, Topics } from "config/flowtypes";
|
|||
import { svg } from "config/icon";
|
||||
import { hex, type Color } from "config/colors";
|
||||
import * as types from "config/types";
|
||||
import * as icons from "@mdi/js"
|
||||
import * as icons from "@mdi/js";
|
||||
|
||||
export const tasmota = {
|
||||
topics: (id: string, name: string): Topics => ({
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue