Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

newstate - accept numeric as well as booleans #165

Open
Littlericket opened this issue Sep 20, 2022 · 1 comment
Open

newstate - accept numeric as well as booleans #165

Littlericket opened this issue Sep 20, 2022 · 1 comment

Comments

@Littlericket
Copy link

Littlericket commented Sep 20, 2022

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.

@benzman81
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants