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

Boolean Inputs Not Recognized #10

Open
Boh1 opened this issue Aug 31, 2022 · 1 comment
Open

Boolean Inputs Not Recognized #10

Boh1 opened this issue Aug 31, 2022 · 1 comment

Comments

@Boh1
Copy link

Boh1 commented Aug 31, 2022

When selecting Boolean true/false as the type for Up/Down values respectively, an error message is generated during execution:

Input property msg.payload should contain the specified low or high value.

This was tested using a Trigger:State node as the input, set to output Boolean values. But the same behaviour can be reproduced using simple Inject nodes as well.

I can work around this by setting Up/Down to type Number and then using Switch and Change nodes to remap the true/false input to 1/0 instead. A bit of a hack.

Are Booleans actually supported for Up/Down values?

@bartbutenaers
Copy link
Owner

Hi @Boh1,

Thanks for reporting this issue!
I have added a fix for this on Github. Note that this fixed version is not available on NPM yet, because @tsknightstorm and I have been working recently on a major release of this node, but were waiting for feedback from the community. Will add a reminder on Discourse, because would like some folks to test the new calibration feature before we release this on NPM.

If you want to try meanwhile whether this fix works correctly (and also didn't mess up other value types), you can install it directly from this Github repository. To do that you need to install git and then execute (from within your .node-red folder):

npm install bartbutenaers/node-red-contrib-button-events

Test feedback is appreciated!
Bart

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

No branches or pull requests

2 participants