Closed Steve-Mcl closed 2 weeks ago
thanks steve well caught, yes the thermostat will have this issue as I check if the value was set because you can send multiple different values into the node but obviously if you set it to zero it will be false, Similar issue in the full color light and the color temp light but I think thats all.
I'll add those helper functions and update to use them
fixed in 0.10.1
I am unable to set the setPoint to zero. Additionally, the temperature would not be set if zero is sent in.
https://github.com/sammachin/node-red-matter-bridge/blob/90827b2a5a54b9585a4dbe39a25b0b51a85743ba/thermostat.js#L44-L59
I haven't checked other files but at a guess, similar oversights might be present so it might be worth adding a couple of helper functions here to test
hasProperty
andisNumber
that can be reused across the js files?helpers in file e.g.
utils.js
Modify the calls to
import helpers
Use helpers