HA Poll State Node firing twice each change #543
Linwood-F posted onGitHub
Problem/Motivation
Beginning somewhere around 0.108 and Node Red 6.20 (probably one before), event poll nodes that used to fire once on a change now fire twice on each change. Hass.io is running on a ubuntu linux HyperV VM.
Expected behavior
Fire either on change (with that option checked) or when polled, but once each.
Actual behavior
Change is firing twice.
The poll is firing only once (correctly).
This behavior is new, and started within the last couple weeks. I have observed it on three different integrations (and one as a light group) and have no reason to think it is integration specific. I see nothing unusual in any log. I have not found any instance that works properly.
The behavior is not cosmetic (i.e. just in the debug), it actually generates two flow entries which (in this case a voice notification) fire twice, so it is two actual initiations.
Steps to reproduce
I am running in Hass.io with the supervisor installed add-on, and both current as of this date (4/20/2022) at 0.108.6 node red 6.20 supervisor 217.
I created a test flow with simply event poll node, checked "on change" but not "on connect", and set it to point to a light. I connected it to a debug node, deployed, then turned the light off. The result is two debugs with identical time stamps.
Proposed changes
Have not looked at the code.
It should only fire once.