fix linter warnings
This commit is contained in:
parent
ef9bc1211f
commit
1ba0c07ebe
1 changed files with 22 additions and 22 deletions
|
|
@ -3,7 +3,7 @@ import type { Config } from "config/flowtypes";
|
||||||
import * as types from "config/types";
|
import * as types from "config/types";
|
||||||
import { mdi } from "config/icon";
|
import { mdi } from "config/icon";
|
||||||
|
|
||||||
const topic_bulb = (bulb: string, argument: string) => ({
|
const topicBulb = (bulb: string, argument: string) => ({
|
||||||
[`${bulb}${argument}`]: {
|
[`${bulb}${argument}`]: {
|
||||||
state: {
|
state: {
|
||||||
name: `home-rust/bulb/${bulb}/${argument}`,
|
name: `home-rust/bulb/${bulb}/${argument}`,
|
||||||
|
|
@ -17,7 +17,7 @@ const topic_bulb = (bulb: string, argument: string) => ({
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
const slider_rgb = (bulb: string, argument: string) => (
|
const sliderRGB = (bulb: string, argument: string) => (
|
||||||
[{
|
[{
|
||||||
type: "slider",
|
type: "slider",
|
||||||
min: 0,
|
min: 0,
|
||||||
|
|
@ -27,7 +27,7 @@ const slider_rgb = (bulb: string, argument: string) => (
|
||||||
topic: `${bulb}${argument}`
|
topic: `${bulb}${argument}`
|
||||||
}]
|
}]
|
||||||
);
|
);
|
||||||
const slider_h = (bulb: string, argument: string) => (
|
const sliderH = (bulb: string, argument: string) => (
|
||||||
[{
|
[{
|
||||||
type: "slider",
|
type: "slider",
|
||||||
min: 0,
|
min: 0,
|
||||||
|
|
@ -37,7 +37,7 @@ const slider_h = (bulb: string, argument: string) => (
|
||||||
topic: `${bulb}${argument}`
|
topic: `${bulb}${argument}`
|
||||||
}]
|
}]
|
||||||
);
|
);
|
||||||
const slider_svxy = (bulb: string, argument: string) => (
|
const sliderSVXY = (bulb: string, argument: string) => (
|
||||||
[{
|
[{
|
||||||
type: "slider",
|
type: "slider",
|
||||||
min: 0,
|
min: 0,
|
||||||
|
|
@ -64,16 +64,16 @@ const config: Config = {
|
||||||
*zigbee2mqtt/bulb_bedroom
|
*zigbee2mqtt/bulb_bedroom
|
||||||
*/
|
*/
|
||||||
|
|
||||||
...topic_bulb("livingroom", "r"),
|
...topicBulb("livingroom", "r"),
|
||||||
...topic_bulb("livingroom", "g"),
|
...topicBulb("livingroom", "g"),
|
||||||
...topic_bulb("livingroom", "b"),
|
...topicBulb("livingroom", "b"),
|
||||||
...topic_bulb("livingroom", "h"),
|
...topicBulb("livingroom", "h"),
|
||||||
...topic_bulb("livingroom", "s"),
|
...topicBulb("livingroom", "s"),
|
||||||
...topic_bulb("livingroom", "v"),
|
...topicBulb("livingroom", "v"),
|
||||||
...topic_bulb("livingroom", "x"),
|
...topicBulb("livingroom", "x"),
|
||||||
...topic_bulb("livingroom", "y"),
|
...topicBulb("livingroom", "y"),
|
||||||
...topic_bulb("livingroom", "animation-speed"),
|
...topicBulb("livingroom", "animation-speed"),
|
||||||
...topic_bulb("livingroom", "mode"),
|
...topicBulb("livingroom", "mode"),
|
||||||
livingroomBrightness: {
|
livingroomBrightness: {
|
||||||
state: {
|
state: {
|
||||||
name: "home-rust/bulb/livingroom/brightness",
|
name: "home-rust/bulb/livingroom/brightness",
|
||||||
|
|
@ -257,24 +257,24 @@ const config: Config = {
|
||||||
type: "section",
|
type: "section",
|
||||||
text: "RGB"
|
text: "RGB"
|
||||||
}
|
}
|
||||||
]).concat(slider_rgb("livingroom", "r"))
|
]).concat(sliderRGB("livingroom", "r"))
|
||||||
.concat(slider_rgb("livingroom", "g"))
|
.concat(sliderRGB("livingroom", "g"))
|
||||||
.concat(slider_rgb("livingroom", "b"))
|
.concat(sliderRGB("livingroom", "b"))
|
||||||
.concat([
|
.concat([
|
||||||
{
|
{
|
||||||
type: "section",
|
type: "section",
|
||||||
text: "HSV"
|
text: "HSV"
|
||||||
}
|
}
|
||||||
]).concat(slider_h("livingroom", "h"))
|
]).concat(sliderH("livingroom", "h"))
|
||||||
.concat(slider_svxy("livingroom", "s"))
|
.concat(sliderSVXY("livingroom", "s"))
|
||||||
.concat(slider_svxy("livingroom", "v"))
|
.concat(sliderSVXY("livingroom", "v"))
|
||||||
.concat([
|
.concat([
|
||||||
{
|
{
|
||||||
type: "section",
|
type: "section",
|
||||||
text: "XY"
|
text: "XY"
|
||||||
}
|
}
|
||||||
]).concat(slider_svxy("livingroom", "x"))
|
]).concat(sliderSVXY("livingroom", "x"))
|
||||||
.concat(slider_svxy("livingroom", "y"))
|
.concat(sliderSVXY("livingroom", "y"))
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
layers: [
|
layers: [
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue