homebridge-http-webhooks icon indicating copy to clipboard operation
homebridge-http-webhooks copied to clipboard

newstate - accept numeric as well as booleans

Open Littlericket opened this issue 2 years ago • 1 comments

Hi,

newstate can only be a written with "true" or "false". There is no way to set the value by setting numeric values to it. I would expect sending a "1" being treat as "true" and "0" being treat as "false". Currently both values generate a false.

I have a switch which triggers on as "1" and off as "0" - there is no way to adjust/transform this to true/false and I would love to put that into homebridge as well.

Littlericket avatar Sep 20 '22 19:09 Littlericket

Why would you expect that 1 works as true? The documentation clearly states whats possible ;-)

Feel free to provide a pull request that adds this feature.

benzman81 avatar Sep 20 '22 21:09 benzman81