Skip to content

"Output on change" missing from documentation for poll state node #1736

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

Open
jeffreychausse opened this issue Jan 25, 2025 · 2 comments
Open

Comments

@jeffreychausse
Copy link

Describe the bug

I'm monitoring a simple input_boolean using the poll state node and although the state of the entity does not change, the node outputs even if the "Output on change" is checked.

Also the "Output on change" is not documented.

To Reproduce

No response

Expected behavior

When "Output on change" is checked, the node should not output if the device's state does not change.

Screenshots

Image

Example Flow

Environment Information

Version: 0.75.0

Home Assistant version: 2025.1.4
Companion version: 4.1.2

Node-RED version: 4.0.8
Docker: yes
Add-on: 19.0.0

Node.js version: v22.11.0 x64 linux
OS: Linux 6.6.66-haos x64

Additional context

No response

@jeffreychausse
Copy link
Author

After some more testing, I realize the "Output on change" is for when the state changes between two polls.

This is useful, but a bit counter intuitive because the name of the node is POLL so we do not expect the node to output between polls. With that in mind, one would think "Output on change" means the node will output only if the state changes after a poll is made. For instance, I set the polling interval to 5sec and was expecting the node to output only upon deploy and then only if the state changed, but it outputs continuously, at the polling interval rate, regardless.

I think adding a description for "Output on change" to the manual would help reduce the confusion.

@zachowj
Copy link
Owner

zachowj commented Jan 26, 2025

The "Output on change" behavior makes sense within the context of the poll-state node. This node is designed to poll at regular intervals, and the "Output on change" option ensures it also outputs when the state changes between those polls. If you want a node that outputs only when the state of the entity changes, regardless of polling, you would use the "events: state" or "trigger: state" node instead. That said, updating the documentation to clarify exactly what "Output on change" does would certainly be helpful.

@zachowj zachowj changed the title Poll State node outputs even if "Output on change" is checked "Output on change" missing from documentation for poll state node Jan 26, 2025
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