Nodered: wait until reset

Hi there, how can I reset (meaning stop) the timeout of the node wait until, meaning a way to cancel the given timeout.

Thanks for any help - JJ

Thanks, already seen, but how to set “property set to any value the node”? I am not sure how to set the property in a payload. Do you have any example? Thanks - JJ

image

[{"id":"98f086ca7fed5768","type":"inject","z":"8b43de8505f17be7","name":"Start wait","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"{\"entities\":{\"entity\":[\"switch.familyroomlightswitch\",\"switch.garagelightswitch\"],\"substring\":[\"light.\"],\"regex\":[\"light.*\"]},\"property\":\"state\",\"comparator\":\"is\",\"value\":\"on\",\"valueType\":\"str\",\"timeout\":30,\"timeoutUnits\":\"seconds\",\"checkCurrentState\":false}","payloadType":"json","x":780,"y":1000,"wires":[["bfec7717f6e5c2be"]]},{"id":"5e98471494ceb00c","type":"inject","z":"8b43de8505f17be7","name":"Cancel wait","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"{\"property\":\"reset\"}","payloadType":"json","x":790,"y":1040,"wires":[["bfec7717f6e5c2be"]]},{"id":"7a2b0674af5a8e80","type":"debug","z":"8b43de8505f17be7","name":"debug 17","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1120,"y":1020,"wires":[]},{"id":"bfec7717f6e5c2be","type":"ha-wait-until","z":"8b43de8505f17be7","name":"","server":"","version":3,"outputs":1,"entities":{"entity":["sensor.backup_state"],"substring":[],"regex":[]},"property":"sensor.backup_state","comparator":"is","value":"on","valueType":"str","timeout":"0","timeoutType":"num","timeoutUnits":"seconds","checkCurrentState":true,"blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"FALSE","valueType":"str"}],"x":960,"y":1020,"wires":[["7a2b0674af5a8e80"]]}]

Would you be so kind and send me a picture on the payload of your “cancel wait” trigger. Could not manage this on my side. Tried:

no success, Tx - JJ

Copy the code (below the image) I posted and import it into your node-red instance - you will see the details (I tested it to confirm it works).

image

Thanks, still not possible to run it. For sure had to adjust the sensorname, but no way. Could you plase have a look into my code below, tx - JJ

[{"id":"0ca4d1483cef10f5","type":"ha-wait-until","z":"21f569de.04fad6","name":"T7?","server":"a11aa034.815b8","version":2,"outputs":2,"entityId":"input_boolean.testswitch7","entityIdFilterType":"exact","property":"state","comparator":"is","value":"on","valueType":"str","timeout":"5","timeoutType":"num","timeoutUnits":"seconds","checkCurrentState":true,"blockInputOverrides":true,"outputProperties":[],"entityLocation":"data","entityLocationType":"none","x":983.5,"y":1602,"wires":[["486b4df58e7f294e"],["e7dd51dae8f5675f"]]},{"id":"05d1f1b823961380","type":"inject","z":"21f569de.04fad6","name":"start","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":789.5,"y":1584,"wires":[["0ca4d1483cef10f5"]]},{"id":"486b4df58e7f294e","type":"debug","z":"21f569de.04fad6","name":"debug 214","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1193.999984741211,"y":1573.0000228881836,"wires":[]},{"id":"e7dd51dae8f5675f","type":"debug","z":"21f569de.04fad6","name":"debug 215","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1174.999984741211,"y":1631.0000247955322,"wires":[]},{"id":"51ec9e80ea842188","type":"inject","z":"21f569de.04fad6","name":"Cancel wait","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"{\"property\":\"reset\"}","payloadType":"json","x":766.6000175476074,"y":1632.2000980377197,"wires":[["0ca4d1483cef10f5"]]},{"id":"a11aa034.815b8","type":"server","name":"Home Assistant","version":5,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true,"heartbeat":false,"heartbeatInterval":30,"areaSelector":"friendlyName","deviceSelector":"friendlyName","entitySelector":"friendlyName","statusSeparator":"at: ","statusYear":"hidden","statusMonth":"short","statusDay":"numeric","statusHourCycle":"h23","statusTimeFormat":"h:m","enableGlobalContextStore":true}]

When you select a node, on the right where the debug panel is, is section labeled help. This will explain how to use the node. For the wait node it tells you

reset
If the received message has this property set to any value the node will be set to inactive and the timeout cleared.

What does this mean.

If the received message has this property.

A message property is it’s name/path.

msg.payload the message property is payload

msg.data the message property is data

We need the message property to be reset so we have so far

image

next

has this property set to any value

So this tells us we can use any value with this message.

image

image

image

Any of the above will work to reset the node.

:pray:
Thank you so much for your great explanation, I was struggling with the property! Now I understand it and the flow works! Thanks. JJ