use string instead of boolean

Because array-keys are strings and it seems that they can not be booleans
This commit is contained in:
Ranlvor 2018-04-21 12:40:08 +02:00
parent 5c3b457511
commit 3a34f34558
Signed by untrusted user who does not match committer: Ranlvor
GPG key ID: 5E12D04750EF6F8E
2 changed files with 2 additions and 2 deletions

View file

@ -703,7 +703,7 @@ const config : Config = {
position: [400, 348], position: [400, 348],
icon: "remote", icon: "remote",
iconColor: (state) => iconColor: (state) =>
(state[tradfri_remote.low("65536")] || state[tradfri_remote.low("65542")]) ? hex("#ff0000") : hex("#000000"), ((state[tradfri_remote.low("65536")] == "true") || (state[tradfri_remote.low("65542")] == "true")) ? hex("#ff0000") : hex("#000000"),
ui: [ ui: [
{ {
type: "progress", type: "progress",

View file

@ -73,7 +73,7 @@ export const tradfri_remote = {
state: `/service/openhab/out/tradfri_0830_gwb8d7af2b448f_${remote_id}_battery_low/state`, state: `/service/openhab/out/tradfri_0830_gwb8d7af2b448f_${remote_id}_battery_low/state`,
command: ``, command: ``,
defaultValue: "OFF", defaultValue: "OFF",
values: { [true]: "ON", [false]: "OFF" } values: { true: "ON", false: "OFF" }
} }
}) })
} }