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

HA Poll State Node firing twice each change #236

Closed
Linwood-F opened this issue Apr 20, 2020 · 1 comment
Closed

HA Poll State Node firing twice each change #236

Linwood-F opened this issue Apr 20, 2020 · 1 comment
Labels
bug Something isn't working

Comments

@Linwood-F
Copy link

Linwood-F commented Apr 20, 2020

Describe the bug

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.

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.

Expected behavior

Fire either on change (with that option checked) or when polled, but once each.

Screenshots

dup

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.

Example Flow

[{"id":"e3804376.748f1","type":"tab","label":"Flow 1","disabled":false,"info":""},{"id":"23f9e697.2c73ca","type":"poll-state","z":"e3804376.748f1","name":"Closet Light","server":"2c833ee2.02d5d2","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"updateinterval":"60","updateIntervalUnits":"seconds","outputinitially":false,"outputonchanged":true,"entity_id":"light.cabinet_lights","state_type":"str","halt_if":"","halt_if_type":"str","halt_if_compare":"is","outputs":1,"x":190,"y":220,"wires":[["f006c154.96e85"]]},{"id":"f006c154.96e85","type":"debug","z":"e3804376.748f1","name":"Any state change","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":440,"y":220,"wires":[]},{"id":"2c833ee2.02d5d2","type":"server","z":"","name":"Home Assistant"}]

Environment (please complete the following information):

  • Node Red Version: 1.0.5 or 6.2.0 (not sure which this comes from)
  • Node.js Version: no idea, whatever is packaged with the hass.io supervisor-added add-on
  • NR Home Assistant Plugin Version: 6.2.0 (what shows up on add-in page on supervisor)
  • Is Node Red running in Docker: HA addon

Other (please complete the following information):

  • Have you searched previous issues for duplicates: Yes.

Additional context

Have not looked at the code.

It should only fire once.

(Note: Originally submitted to Hass.io addons #543 and Frank pointed me here.

@github-actions
Copy link
Contributor

@Linwood-F: hello! 👋

This issue is being automatically closed because it does not follow the issue template.

Fixing this with automatically reopen the issue.

@github-actions github-actions bot reopened this Apr 20, 2020
@zachowj zachowj added the bug Something isn't working label Apr 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants