Use the wrong type (String instead of Number) to make Flow happy
This commit is contained in:
parent
ee4800d087
commit
94aafdfbdd
1 changed files with 8 additions and 8 deletions
|
|
@ -184,13 +184,13 @@ const config: Config = {
|
||||||
heaterDiningroomTsoll: {
|
heaterDiningroomTsoll: {
|
||||||
state: {
|
state: {
|
||||||
name: "tele/home-rust/fritzbox/device/diningroom/tsoll",
|
name: "tele/home-rust/fritzbox/device/diningroom/tsoll",
|
||||||
type: (msg) => (msg.toString().split(" ")[1]/2)
|
type: (msg) => ((parseFloat(msg.toString().split(" ")[1])/2).toString())
|
||||||
},
|
},
|
||||||
command: {
|
command: {
|
||||||
name: "home-rust/fritzbox/device/diningroom/tsoll/set",
|
name: "home-rust/fritzbox/device/diningroom/tsoll/set",
|
||||||
type: (msg) => ((msg * 2).toString())
|
type: (msg) => (Buffer.from((parseFloat(msg) * 2).toString()))
|
||||||
},
|
},
|
||||||
defaultValue: 126.5
|
defaultValue: "126.5"
|
||||||
},
|
},
|
||||||
heaterOfficeNachtabsenkung: {
|
heaterOfficeNachtabsenkung: {
|
||||||
state: {
|
state: {
|
||||||
|
|
@ -554,7 +554,7 @@ const config: Config = {
|
||||||
name: "Heizung Esszimmer",
|
name: "Heizung Esszimmer",
|
||||||
position: [410, 658],
|
position: [410, 658],
|
||||||
icon: withState(({heaterDiningroomTsoll}) => (
|
icon: withState(({heaterDiningroomTsoll}) => (
|
||||||
heaterDiningroomTsoll === 126.5 ?
|
heaterDiningroomTsoll === "126.5" ?
|
||||||
svg(icons.mdiRadiatorDisabled) : svg(icons.mdiRadiator)
|
svg(icons.mdiRadiatorDisabled) : svg(icons.mdiRadiator)
|
||||||
)),
|
)),
|
||||||
ui: [
|
ui: [
|
||||||
|
|
@ -563,16 +563,16 @@ const config: Config = {
|
||||||
topic: "heaterDiningroomTsoll",
|
topic: "heaterDiningroomTsoll",
|
||||||
text: "Volle Power",
|
text: "Volle Power",
|
||||||
icon: svg(icons.mdiRadiator),
|
icon: svg(icons.mdiRadiator),
|
||||||
on: 127,
|
on: "127",
|
||||||
off: 25
|
off: "25"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: "toggle",
|
type: "toggle",
|
||||||
topic: "heaterDiningroomTsoll",
|
topic: "heaterDiningroomTsoll",
|
||||||
text: "Ausschalten",
|
text: "Ausschalten",
|
||||||
icon: svg(icons.mdiRadiatorDisabled),
|
icon: svg(icons.mdiRadiatorDisabled),
|
||||||
on: 126.5,
|
on: "126.5",
|
||||||
off: 25
|
off: "25"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: "slider",
|
type: "slider",
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue