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

Allow Current State Node If State to be converted to boolean from on/off without forcing the State Type to boolean. #176

Closed
niemyjski opened this issue Dec 26, 2019 · 7 comments

Comments

@niemyjski
Copy link

niemyjski commented Dec 26, 2019

I'm using latest stable of hassio + nodered. I have an input boolean that I check to see if I should enable all my automations. I noticed that the state type is correctly converted to boolean but the if state condition type is always evaluated to a string so when the expression is evaluated it's check !!condition is always true. I believe the correct behavior would be to set the if state condition type to the same state type we are converting too (currently state type is converted to a boolean but the if state condition is treated as a string.

image

Update: This is fixed, however it would be really nice to use Boolean logic on the If State without changing the state type to boolean. Should I create a new issue or update the description on this one?

@niemyjski
Copy link
Author

niemyjski commented Dec 26, 2019

Also it would be really nice if you change the state type to boolean / number maybe the if statement just becomes a checkbox or number field.

@zachowj
Copy link
Owner

zachowj commented Dec 27, 2019

Based on the screenshot I would say you're not using the latest release of this package. I don't use hass.io but my guess would be you're using a version from around the time that ingress was added to the Node-RED add-on. What version does the NR palette manager say is installed?

The current version of this package should show something like this when you're editing the current-state node.

image

@niemyjski
Copy link
Author

It says 0.10.2 is the version I'm using.

@niemyjski
Copy link
Author

Yeah I'm way out of date. I gotta figure out why this isn't being updated by the hassio package.

@niemyjski
Copy link
Author

This is fixed, however it would be really nice to use Boolean logic on the If State without changing the state type to boolean. Should I create a new issue or update the description on this one?

@niemyjski niemyjski changed the title Current State Node doesn't correctly convert If State to boolean. Allow Current State Node If State to be converted to boolean from on/off without forcing the State Type to boolean. Dec 31, 2019
@zachowj
Copy link
Owner

zachowj commented Dec 31, 2019

I don't understand exactly what you're asking for? Have an example?

@zachowj
Copy link
Owner

zachowj commented Jan 18, 2020

duplicate of #197

@zachowj zachowj closed this as completed Jan 18, 2020
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