nodejs-poolcontroller 7.7.0 → 8.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintrc.json +26 -35
- package/Changelog +22 -0
- package/README.md +7 -3
- package/anslq25/MessagesMock.ts +218 -0
- package/anslq25/boards/MockBoardFactory.ts +50 -0
- package/anslq25/boards/MockEasyTouchBoard.ts +696 -0
- package/anslq25/boards/MockSystemBoard.ts +217 -0
- package/anslq25/chemistry/MockChlorinator.ts +75 -0
- package/anslq25/pumps/MockPump.ts +84 -0
- package/app.ts +10 -14
- package/config/Config.ts +13 -9
- package/config/VersionCheck.ts +6 -2
- package/controller/Constants.ts +58 -25
- package/controller/Equipment.ts +225 -41
- package/controller/Errors.ts +2 -1
- package/controller/Lockouts.ts +34 -2
- package/controller/State.ts +491 -48
- package/controller/boards/AquaLinkBoard.ts +6 -3
- package/controller/boards/BoardFactory.ts +5 -1
- package/controller/boards/EasyTouchBoard.ts +1971 -1751
- package/controller/boards/IntelliCenterBoard.ts +1311 -1688
- package/controller/boards/IntelliComBoard.ts +7 -1
- package/controller/boards/IntelliTouchBoard.ts +153 -42
- package/controller/boards/NixieBoard.ts +209 -66
- package/controller/boards/SunTouchBoard.ts +393 -0
- package/controller/boards/SystemBoard.ts +1862 -1543
- package/controller/comms/Comms.ts +539 -138
- package/controller/comms/ScreenLogic.ts +1663 -0
- package/controller/comms/messages/Messages.ts +242 -60
- package/controller/comms/messages/config/ChlorinatorMessage.ts +4 -3
- package/controller/comms/messages/config/CircuitGroupMessage.ts +5 -2
- package/controller/comms/messages/config/CircuitMessage.ts +81 -13
- package/controller/comms/messages/config/ConfigMessage.ts +3 -1
- package/controller/comms/messages/config/CoverMessage.ts +2 -1
- package/controller/comms/messages/config/CustomNameMessage.ts +2 -1
- package/controller/comms/messages/config/EquipmentMessage.ts +5 -1
- package/controller/comms/messages/config/ExternalMessage.ts +33 -3
- package/controller/comms/messages/config/FeatureMessage.ts +2 -1
- package/controller/comms/messages/config/GeneralMessage.ts +2 -1
- package/controller/comms/messages/config/HeaterMessage.ts +3 -1
- package/controller/comms/messages/config/IntellichemMessage.ts +2 -1
- package/controller/comms/messages/config/OptionsMessage.ts +12 -6
- package/controller/comms/messages/config/PumpMessage.ts +9 -12
- package/controller/comms/messages/config/RemoteMessage.ts +80 -13
- package/controller/comms/messages/config/ScheduleMessage.ts +43 -3
- package/controller/comms/messages/config/SecurityMessage.ts +2 -1
- package/controller/comms/messages/config/ValveMessage.ts +43 -26
- package/controller/comms/messages/status/ChlorinatorStateMessage.ts +8 -7
- package/controller/comms/messages/status/EquipmentStateMessage.ts +93 -20
- package/controller/comms/messages/status/HeaterStateMessage.ts +24 -5
- package/controller/comms/messages/status/IntelliChemStateMessage.ts +7 -4
- package/controller/comms/messages/status/IntelliValveStateMessage.ts +2 -1
- package/controller/comms/messages/status/PumpStateMessage.ts +72 -4
- package/controller/comms/messages/status/VersionMessage.ts +2 -1
- package/controller/nixie/Nixie.ts +15 -4
- package/controller/nixie/NixieEquipment.ts +1 -0
- package/controller/nixie/chemistry/ChemController.ts +300 -129
- package/controller/nixie/chemistry/ChemDoser.ts +806 -0
- package/controller/nixie/chemistry/Chlorinator.ts +133 -129
- package/controller/nixie/circuits/Circuit.ts +171 -30
- package/controller/nixie/heaters/Heater.ts +337 -173
- package/controller/nixie/pumps/Pump.ts +264 -236
- package/controller/nixie/schedules/Schedule.ts +9 -3
- package/defaultConfig.json +46 -5
- package/logger/Logger.ts +38 -9
- package/package.json +13 -9
- package/web/Server.ts +235 -122
- package/web/bindings/aqualinkD.json +114 -59
- package/web/bindings/homeassistant.json +437 -0
- package/web/bindings/influxDB.json +15 -0
- package/web/bindings/mqtt.json +28 -9
- package/web/bindings/mqttAlt.json +15 -0
- package/web/interfaces/baseInterface.ts +58 -7
- package/web/interfaces/httpInterface.ts +5 -2
- package/web/interfaces/influxInterface.ts +9 -2
- package/web/interfaces/mqttInterface.ts +234 -74
- package/web/interfaces/ruleInterface.ts +87 -0
- package/web/services/config/Config.ts +140 -33
- package/web/services/config/ConfigSocket.ts +2 -1
- package/web/services/state/State.ts +144 -3
- package/web/services/state/StateSocket.ts +65 -14
- package/web/services/utilities/Utilities.ts +189 -1
|
@@ -7,121 +7,155 @@
|
|
|
7
7
|
"transform": ".toLowerCase()"
|
|
8
8
|
},
|
|
9
9
|
{
|
|
10
|
-
"regexkey": "\\s",
|
|
11
|
-
"replace": "",
|
|
12
|
-
"description": "Remove whitespace"
|
|
13
|
-
},
|
|
14
|
-
{
|
|
15
|
-
"regexkey": "\\/",
|
|
16
|
-
"replace": "",
|
|
17
|
-
"description": "Remove /"
|
|
18
|
-
},
|
|
19
|
-
{
|
|
20
|
-
"regexkey": "\\+",
|
|
21
|
-
"replace": "",
|
|
22
|
-
"description": "Remove +"
|
|
23
|
-
},
|
|
24
|
-
{
|
|
25
|
-
"regexkey": "\\$",
|
|
26
|
-
"replace": "",
|
|
27
|
-
"description": "Remove $"
|
|
28
|
-
},
|
|
29
|
-
{
|
|
30
|
-
"regexkey": "\\#",
|
|
31
|
-
"replace": "",
|
|
32
|
-
"description": "Remove #"
|
|
10
|
+
"regexkey": "[\\s+\\/\\+\\$\\#]",
|
|
11
|
+
"replace": "-",
|
|
12
|
+
"description": "Remove [whitespace,/,+,$,#]"
|
|
33
13
|
}
|
|
34
14
|
],
|
|
35
15
|
"rootTopic-DIRECTIONS": "You can override the root topic by renaming _rootTopic to rootTopic",
|
|
36
16
|
"_rootTopic": "@bind=(state.equipment.alias).replace(' ','-').replace('/','').toLowerCase();",
|
|
37
|
-
"clientId": "@bind
|
|
17
|
+
"clientId": "@bind=`aqualinkd_njsPC_${webApp.mac().replace(/:/g, '_'}-${webApp.httpPort()}`;"
|
|
18
|
+
},
|
|
19
|
+
"vars": {
|
|
20
|
+
"tempPrecision": 2,
|
|
21
|
+
"tempUnits": "@bind=sys.board.valueMaps.tempUnits.getName(state.temps.units);"
|
|
38
22
|
}
|
|
39
23
|
},
|
|
40
24
|
"subscriptions": [
|
|
41
25
|
{
|
|
42
26
|
"topic": "Aux_1",
|
|
43
27
|
"description": "State of the Aux_1 circuit on AqualinkD",
|
|
44
|
-
"processor": [
|
|
28
|
+
"processor": [
|
|
29
|
+
"let val = parseInt(value, 10);",
|
|
30
|
+
"if(!isNaN(val)) sys.board.circuits.setCircuitStateAsync(2, parseInt(value, 10) === 1);"
|
|
31
|
+
|
|
32
|
+
]
|
|
45
33
|
},
|
|
46
34
|
{
|
|
47
35
|
"topic": "Aux_2",
|
|
48
36
|
"description": "State of the Aux_2 circuit on AqualinkD",
|
|
49
|
-
"processor": [
|
|
37
|
+
"processor": [
|
|
38
|
+
"let val = parseInt(value, 10);",
|
|
39
|
+
"if(!isNaN(val)) sys.board.circuits.setCircuitStateAsync(3, val === 1);"
|
|
40
|
+
]
|
|
50
41
|
},
|
|
51
42
|
{
|
|
52
43
|
"topic": "Aux_3",
|
|
53
44
|
"description": "State of the Aux_3 circuit on AqualinkD",
|
|
54
|
-
"processor": [
|
|
45
|
+
"processor": [
|
|
46
|
+
"let val = parseInt(value, 10);",
|
|
47
|
+
"if(!isNaN(val)) sys.board.circuits.setCircuitStateAsync(4, val === 1);"
|
|
48
|
+
]
|
|
55
49
|
},
|
|
56
50
|
{
|
|
57
51
|
"topic": "Aux_4",
|
|
58
52
|
"description": "State of the Aux_4 circuit on AqualinkD",
|
|
59
|
-
"processor": [
|
|
53
|
+
"processor": [
|
|
54
|
+
"let val = parseInt(value, 10);",
|
|
55
|
+
"if(!isNaN(val)) sys.board.circuits.setCircuitStateAsync(5, val === 1);"
|
|
56
|
+
]
|
|
60
57
|
},
|
|
61
58
|
{
|
|
62
59
|
"topic": "Aux_5",
|
|
63
60
|
"description": "State of the Aux_5 circuit on AqualinkD",
|
|
64
|
-
"processor": [
|
|
61
|
+
"processor": [
|
|
62
|
+
"let val = parseInt(value, 10);",
|
|
63
|
+
"if(!isNaN(val)) sys.board.circuits.setCircuitStateAsync(7, val === 1);"
|
|
64
|
+
]
|
|
65
65
|
},
|
|
66
66
|
{
|
|
67
67
|
"topic": "Aux_6",
|
|
68
68
|
"description": "State of the Aux_1 circuit on AqualinkD",
|
|
69
|
-
"processor": [
|
|
69
|
+
"processor": [
|
|
70
|
+
"let val = parseInt(value, 10);",
|
|
71
|
+
"if(!isNaN(val)) sys.board.circuits.setCircuitStateAsync(8, val === 1);"
|
|
72
|
+
]
|
|
70
73
|
},
|
|
71
74
|
{
|
|
72
75
|
"topic": "Aux_7",
|
|
73
76
|
"description": "State of the Aux_7 circuit on AqualinkD",
|
|
74
|
-
"processor": [
|
|
77
|
+
"processor": [
|
|
78
|
+
"let val = parseInt(value, 10);",
|
|
79
|
+
"if(!isNaN(val)) sys.board.circuits.setCircuitStateAsync(9, val === 1);"
|
|
80
|
+
]
|
|
75
81
|
},
|
|
76
82
|
{
|
|
77
83
|
"topic": "Aux_8",
|
|
78
84
|
"description": "State of the Aux_8 circuit on AqualinkD",
|
|
79
|
-
"processor": [
|
|
85
|
+
"processor": [
|
|
86
|
+
"let val = parseInt(value, 10);",
|
|
87
|
+
"if(!isNaN(val)) sys.board.circuits.setCircuitStateAsync(10, val === 1);"
|
|
88
|
+
]
|
|
80
89
|
},
|
|
81
90
|
{
|
|
82
91
|
"topic": "Aux_B1",
|
|
83
92
|
"description": "State of the Aux_B1 feature on AqualinkD",
|
|
84
|
-
"processor": [
|
|
93
|
+
"processor": [
|
|
94
|
+
"let val = parseInt(value, 10);",
|
|
95
|
+
"if(!isNaN(val)) sys.board.features.setFeatureStateAsync(129, val === 1);"
|
|
96
|
+
]
|
|
85
97
|
},
|
|
86
98
|
{
|
|
87
99
|
"topic": "Aux_B2",
|
|
88
100
|
"description": "State of the Aux_B2 feature on AqualinkD",
|
|
89
|
-
"processor": [
|
|
101
|
+
"processor": [
|
|
102
|
+
"let val = parseInt(value, 10);",
|
|
103
|
+
"if(!isNaN(val)) sys.board.features.setFeatureStateAsync(130, val === 1);"
|
|
104
|
+
]
|
|
90
105
|
},
|
|
91
106
|
{
|
|
92
107
|
"topic": "Aux_B3",
|
|
93
108
|
"description": "State of the Aux_B3 feature on AqualinkD",
|
|
94
|
-
"processor": [
|
|
109
|
+
"processor": [
|
|
110
|
+
"let val = parseInt(value, 10);",
|
|
111
|
+
"if(!isNaN(val)) sys.board.features.setFeatureStateAsync(131, val === 1);"
|
|
112
|
+
]
|
|
95
113
|
},
|
|
96
114
|
{
|
|
97
115
|
"topic": "Aux_B4",
|
|
98
116
|
"description": "State of the Aux_B4 feature on AqualinkD",
|
|
99
|
-
"processor": [
|
|
117
|
+
"processor": [
|
|
118
|
+
"let val = parseInt(value, 10);",
|
|
119
|
+
"if(!isNaN(val)) sys.board.features.setFeatureStateAsync(132, val === 1);"
|
|
120
|
+
]
|
|
100
121
|
},
|
|
101
122
|
{
|
|
102
123
|
"topic": "Aux_B5",
|
|
103
124
|
"description": "State of the Aux_B5 feature on AqualinkD",
|
|
104
|
-
"processor": [
|
|
125
|
+
"processor": [
|
|
126
|
+
"let val = parseInt(value, 10);",
|
|
127
|
+
"if(!isNaN(val)) sys.board.features.setFeatureStateAsync(133, val === 1);"
|
|
128
|
+
]
|
|
105
129
|
},
|
|
106
130
|
{
|
|
107
131
|
"topic": "Aux_B6",
|
|
108
132
|
"description": "State of the Aux_B6 feature on AqualinkD",
|
|
109
|
-
"processor": [
|
|
133
|
+
"processor": [
|
|
134
|
+
"let val = parseInt(value, 10);",
|
|
135
|
+
"if(!isNaN(val)) sys.board.features.setFeatureStateAsync(134, val === 1);"
|
|
136
|
+
]
|
|
110
137
|
},
|
|
111
138
|
{
|
|
112
139
|
"topic": "Aux_B7",
|
|
113
140
|
"description": "State of the Aux_B7 feature on AqualinkD",
|
|
114
|
-
"processor": [
|
|
141
|
+
"processor": [
|
|
142
|
+
"let val = parseInt(value, 10);",
|
|
143
|
+
"if(!isNaN(val)) sys.board.features.setFeatureStateAsync(135, val === 1);"
|
|
144
|
+
]
|
|
115
145
|
},
|
|
116
146
|
{
|
|
117
147
|
"topic": "Aux_B8",
|
|
118
148
|
"description": "State of the Aux_B8 feature on AqualinkD",
|
|
119
|
-
"processor": [
|
|
149
|
+
"processor": [
|
|
150
|
+
"let val = parseInt(value, 10);",
|
|
151
|
+
"if(!isNaN(val)) sys.board.features.setFeatureStateAsync(136, val === 1);"
|
|
152
|
+
]
|
|
120
153
|
},
|
|
121
154
|
{
|
|
122
155
|
"topic": "Filter_Pump",
|
|
123
156
|
"description": "State of the Filter_Pump on AqualinkD",
|
|
124
157
|
"processor": [
|
|
158
|
+
"if(isNaN(parseInt(value, 10))) return;",
|
|
125
159
|
"if(state.circuits.getItemById(1).isOn === false) ",
|
|
126
160
|
" sys.board.circuits.setCircuitStateAsync(6, parseInt(value, 10) === 1);",
|
|
127
161
|
"else sys.board.circuits.setCircuitStateAsync(1, parseInt(value, 10) === 1);"
|
|
@@ -130,13 +164,17 @@
|
|
|
130
164
|
{
|
|
131
165
|
"topic": "Spa_Mode",
|
|
132
166
|
"description": "The body mode for the controller. If 1 then we are in spa mode otherwise we are in pool mode.",
|
|
133
|
-
"processor": [
|
|
167
|
+
"processor": [
|
|
168
|
+
"if(isNaN(parseInt(value, 10))) return;",
|
|
169
|
+
"sys.board.circuits.setCircuitStateAsync(1, parseInt(value, 10) === 1);"
|
|
170
|
+
]
|
|
134
171
|
},
|
|
135
172
|
{
|
|
136
173
|
"topic": "Temperature/Pool",
|
|
137
174
|
"description": "The current temperature emitted by the controller for the pool. However, we only want to set this when the pool circuit is on.",
|
|
138
175
|
"processor": [
|
|
139
|
-
"
|
|
176
|
+
"if(isNaN(parseFloat(value))) return;",
|
|
177
|
+
"let temp = ctx.util.convert.temperature.convertUnits(parseFloat(value), ctx.vars.tempUnits, sys.board.valueMaps.tempUnits.getName(state.temps.units));",
|
|
140
178
|
"state.temps.bodies.getItemById(1).temp = temp;",
|
|
141
179
|
"if(state.circuits.getItemById(6).isOn) sys.board.system.setTempsAsync({ waterSensor1: temp });"
|
|
142
180
|
]
|
|
@@ -145,7 +183,8 @@
|
|
|
145
183
|
"topic": "Temperature/Spa",
|
|
146
184
|
"description": "The current temperature emitted by the controller for the spa. However, we only want to set this when the spa circuit is on.",
|
|
147
185
|
"processor": [
|
|
148
|
-
"
|
|
186
|
+
"if(isNaN(parseFloat(value))) return;",
|
|
187
|
+
"let temp = ctx.util.convert.temperature.convertUnits(parseFloat(value), ctx.vars.tempUnits, sys.board.valueMaps.tempUnits.getName(state.temps.units));",
|
|
149
188
|
"state.temps.bodies.getItemById(2).temp = temp;",
|
|
150
189
|
"if(state.circuits.getItemById(1).isOn) sys.board.system.setTempsAsync({ waterSensor1: temp });"
|
|
151
190
|
]
|
|
@@ -154,7 +193,8 @@
|
|
|
154
193
|
"topic": "Temperature/Air",
|
|
155
194
|
"description": "The current temperature emitted by the controller for air temperature.",
|
|
156
195
|
"processor": [
|
|
157
|
-
"
|
|
196
|
+
"if(isNaN(parseFloat(value))) return;",
|
|
197
|
+
"let temp = ctx.util.convert.temperature.convertUnits(parseFloat(value), ctx.vars.tempUnits, sys.board.valueMaps.tempUnits.getName(state.temps.units));",
|
|
158
198
|
"sys.board.system.setTempsAsync({ air: temp });"
|
|
159
199
|
]
|
|
160
200
|
},
|
|
@@ -162,7 +202,8 @@
|
|
|
162
202
|
"topic": "Temperature/Solar",
|
|
163
203
|
"description": "The current temperature emitted by the controller for solar.",
|
|
164
204
|
"processor": [
|
|
165
|
-
"
|
|
205
|
+
"if(isNaN(parseFloat(value))) return;",
|
|
206
|
+
"let temp = ctx.util.convert.temperature.convertUnits(parseFloat(value), ctx.vars.tempUnits, sys.board.valueMaps.tempUnits.getName(state.temps.units));",
|
|
166
207
|
"sys.board.system.setTempsAsync({ solarSensor1: temp });"
|
|
167
208
|
]
|
|
168
209
|
},
|
|
@@ -309,18 +350,25 @@
|
|
|
309
350
|
{
|
|
310
351
|
"topic": "Pool_Heater/enabled",
|
|
311
352
|
"description": "The current heat mode for the pool heater",
|
|
312
|
-
"processor": [
|
|
353
|
+
"processor": [
|
|
354
|
+
"if(isNaN(parseInt(value, 10))) return;",
|
|
355
|
+
"sys.bodies.getItemById(1).heatMode = state.temps.bodies.getItemById(1).heatMode = parseInt(value, 10) === 1 ? 2 : 1;"
|
|
356
|
+
]
|
|
313
357
|
},
|
|
314
358
|
{
|
|
315
359
|
"topic": "Spa_Heater/enabled",
|
|
316
360
|
"description": "The current heat mode for the spa heater",
|
|
317
|
-
"processor": [
|
|
361
|
+
"processor": [
|
|
362
|
+
"if(isNaN(parseInt(value, 10))) return;",
|
|
363
|
+
"sys.bodies.getItemById(2).heatMode = state.temps.bodies.getItemById(2).heatMode = parseInt(value, 10) === 1 ? 2 : 1;"
|
|
364
|
+
]
|
|
318
365
|
},
|
|
319
366
|
{
|
|
320
367
|
"topic": "Pool_Heater/setpoint",
|
|
321
368
|
"description": "The setpoint for the pool body",
|
|
322
369
|
"processor": [
|
|
323
|
-
"
|
|
370
|
+
"if(isNaN(parseFloat(value))) return;",
|
|
371
|
+
"let temp = ctx.util.convert.temperature.convertUnits(parseFloat(value), ctx.vars.tempUnits, sys.board.valueMaps.tempUnits.getName(state.temps.units));",
|
|
324
372
|
"let body = sys.bodies.getItemById(1); sys.board.bodies.setHeatSetpointAsync(body, parseInt(temp, 10));"
|
|
325
373
|
]
|
|
326
374
|
},
|
|
@@ -328,7 +376,8 @@
|
|
|
328
376
|
"topic": "Spa_Heater/setpoint",
|
|
329
377
|
"description": "The setpoint for the spa body",
|
|
330
378
|
"processor": [
|
|
331
|
-
"
|
|
379
|
+
"if(isNaN(parseFloat(value))) return;",
|
|
380
|
+
"let temp = ctx.util.convert.temperature.convertUnits(parseFloat(value), ctx.vars.tempUnits, sys.board.valueMaps.tempUnits.getName(state.temps.units));",
|
|
332
381
|
"let body = sys.bodies.getItemById(2); sys.board.bodies.setHeatSetpointAsync(body, parseInt(temp, 10));"
|
|
333
382
|
]
|
|
334
383
|
},
|
|
@@ -352,8 +401,8 @@
|
|
|
352
401
|
"topic": "Freeze_Protect/setpoint",
|
|
353
402
|
"description": "The current freeze protection setpoint",
|
|
354
403
|
"processor": [
|
|
355
|
-
"let temp = ctx.util.temperature.convertUnits(parseFloat(value),
|
|
356
|
-
"sys.general.options.freezeThreshold = parseInt(temp, 10);"
|
|
404
|
+
"let temp = ctx.util.temperature.convertUnits(parseFloat(value), ctx.vars.tempUnits, sys.board.valueMaps.tempUnits.getName(state.temps.units));",
|
|
405
|
+
"sys.general.options.freezeThreshold = parseInt(Math.round(temp), 10);"
|
|
357
406
|
]
|
|
358
407
|
},
|
|
359
408
|
{
|
|
@@ -454,33 +503,39 @@
|
|
|
454
503
|
"topic": "Pool_Heater/setpoint/set",
|
|
455
504
|
"message": "@bind=data.setPoint;",
|
|
456
505
|
"description": "Set the heat setpoint for the pool",
|
|
457
|
-
"filter": "@bind=data.id
|
|
506
|
+
"filter": "@bind=data.id === 1;",
|
|
458
507
|
"processor": [
|
|
459
508
|
"let units = sys.board.valueMaps.tempUnits.getName(state.temps.units);",
|
|
460
|
-
"return ctx.util.convert.temperature.convertUnits(data.setPoint, units,
|
|
509
|
+
"return ctx.util.roundNumber(ctx.util.convert.temperature.convertUnits(data.setPoint, units, ctx.vars.tempUnits), ctx.vars.tempPrecision);"
|
|
461
510
|
]
|
|
462
511
|
},
|
|
463
512
|
{
|
|
464
513
|
"topic": "Spa_Heater/setpoint/set",
|
|
465
514
|
"message": "@bind=data.setPoint;",
|
|
466
515
|
"description": "Set the heat setpoint for the spa",
|
|
467
|
-
"filter": "@bind=data.id
|
|
516
|
+
"filter": "@bind=data.id === 2;",
|
|
468
517
|
"processor": [
|
|
469
518
|
"let units = sys.board.valueMaps.tempUnits.getName(state.temps.units);",
|
|
470
|
-
"return ctx.util.convert.temperature.convertUnits(data.setPoint, units,
|
|
519
|
+
"return ctx.util.roundNumber(ctx.util.convert.temperature.convertUnits(data.setPoint, units, ctx.vars.tempUnits), ctx.vars.tempPrecision);"
|
|
471
520
|
]
|
|
472
521
|
},
|
|
473
522
|
{
|
|
474
523
|
"topic": "Pool_Heater/set",
|
|
475
|
-
"message": "@bind=data.heatMode.val === 2 ? 1 : 0
|
|
524
|
+
"message": "@bind=data.heatMode.val; === 2 ? 1 : 0",
|
|
476
525
|
"description": "Bind the state",
|
|
477
|
-
"filter": "@bind=data.id === 1;"
|
|
526
|
+
"filter": "@bind=data.id === 1;",
|
|
527
|
+
"processor": [
|
|
528
|
+
"return typeof data.heatMode !== 'undefined' && data.heatMode.val === 2 ? 1 : 0;"
|
|
529
|
+
]
|
|
478
530
|
},
|
|
479
531
|
{
|
|
480
532
|
"topic": "Spa_Heater/set",
|
|
481
|
-
"message": "@bind=data.heatMode.val === 2 ? 1 : 0
|
|
533
|
+
"message": "@bind=data.heatMode.val; === 2 ? 1 : 0",
|
|
482
534
|
"description": "Bind the state",
|
|
483
|
-
"filter": "@bind=data.id === 2;"
|
|
535
|
+
"filter": "@bind=data.id === 2;",
|
|
536
|
+
"processor": [
|
|
537
|
+
"return typeof data.heatMode !== 'undefined' && data.heatMode.val === 2 ? 1 : 0;"
|
|
538
|
+
]
|
|
484
539
|
}
|
|
485
540
|
|
|
486
541
|
]
|