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

Wait until not firing when using Mustache Templates to set entitiy_id #259

Closed
ngelotte opened this issue Aug 7, 2020 · 0 comments
Closed

Comments

@ngelotte
Copy link

ngelotte commented Aug 7, 2020

Describe the bug

I am reusing a subflow with different components in my Home Assistant System. So I need to pass the EntityId into the wait until node using either mustache templates or msg. But even if the state changes the wait until node never triggers

To Reproduce

Steps to reproduce the behavior:

Save the name of the enitity in a flow variable or set the incoming msg to have the name of the enitity. Create a Wait Until node and set the Entity_Id to a mustache template for the passed in value. Create a debug node on the out and on timed out.

Expected behavior

If I set the Entity_Id either with a Mustache template using a flow variable, a Mustache template with a data from msg when the Entity changes state to match the expected state

Screenshots

NodeRed

Example Flow

[{"id":"be6437e5.bd41f8","type":"tab","label":"Flow 1","disabled":false,"info":""},{"id":"2910897c.e6b956","type":"inject","z":"be6437e5.bd41f8","name":"","props":[{"p":"payload","v":"","vt":"date"},{"p":"topic","v":"","vt":"string"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":140,"y":380,"wires":[["66842e0e.3419c"]]},{"id":"4959d9bd.10ff48","type":"ha-wait-until","z":"be6437e5.bd41f8","name":"Wait until Switch is On","server":"1943d45e.4c5bdc","outputs":2,"entityId":"{{payload}}","entityIdFilterType":"exact","property":"state","comparator":"is","value":"on","valueType":"str","timeout":"20","timeoutType":"num","timeoutUnits":"seconds","entityLocation":"output","entityLocationType":"msg","checkCurrentState":false,"blockInputOverrides":false,"x":600,"y":420,"wires":[["fcb79f2a.c5837"],["5b2cf38e.e5580c"]]},{"id":"66842e0e.3419c","type":"change","z":"be6437e5.bd41f8","name":"Set msg.payload to entityid","rules":[{"t":"set","p":"payload","pt":"msg","to":"switch.st3p2","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":360,"y":380,"wires":[["96dd64e.56fe398","4959d9bd.10ff48"]]},{"id":"96dd64e.56fe398","type":"api-current-state","z":"be6437e5.bd41f8","name":"Check Switch State","server":"1943d45e.4c5bdc","version":1,"outputs":1,"halt_if":"","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"{{payload}}","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":590,"y":320,"wires":[["60bb601f.44a3f"]]},{"id":"60bb601f.44a3f","type":"debug","z":"be6437e5.bd41f8","name":"Check Switch State","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":870,"y":260,"wires":[]},{"id":"fcb79f2a.c5837","type":"debug","z":"be6437e5.bd41f8","name":"Wait Until passed succesfully","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":880,"y":400,"wires":[]},{"id":"5b2cf38e.e5580c","type":"debug","z":"be6437e5.bd41f8","name":"Wait Until Timed out","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":860,"y":500,"wires":[]},{"id":"1943d45e.4c5bdc","type":"server","z":"","name":"Home Assistant","addon":true}]

Environment (please complete the following information):

  • Node Red Version: v1.1.0
  • Node.js Version: 12.17.0-r0
  • NR Home Assistant Plugin Version:v0.22.6
  • Is Node Red running in Docker: HA addon v 7.0

Other (please complete the following information):

yes. and I do not have Block Input Overrides checked.

Additional context

@zachowj zachowj closed this as completed in 5721ebb Aug 7, 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

1 participant