benzman81/homebridge-http-webhooks

newstate - accept numeric as well as booleans

Littlericket opened this issue · 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.

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.