# How to make flow wait for response of actionable notification / no retrigger

**URL:** <https://discourse.nodered.org/t/how-to-make-flow-wait-for-response-of-actionable-notification-no-retrigger/69465>\
**Category:** General\
**Created:** [23 October 2022 20:31 UTC](https://discourse.nodered.org/t/how-to-make-flow-wait-for-response-of-actionable-notification-no-retrigger/69465 "2022-10-23T20:31:24Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![plimplamm](https://avatars.discourse-cdn.com/v4/letter/p/76d3ee/32.png) [@plimplamm](https://discourse.nodered.org/u/plimplamm)\
**Post date:** [23 October 2022 20:31 UTC](https://discourse.nodered.org/t/how-to-make-flow-wait-for-response-of-actionable-notification-no-retrigger/69465/1 "2022-10-23T20:31:25Z")

</div>

Hi everyone. I have a flow that sends out an actionable notification (iOS) to ask whether I want to start the washing machine when solar production is up and consumption is down.

Currently, the flow retriggers and keeps sending notifications whenever the solar-production-state (first node) changes.

How can I prevent this from happening? Thanks for your help!

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/e/f/efb9658e3ba6a568aa89372f81336940365c3651.png)

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [23 October 2022 21:06 UTC](https://discourse.nodered.org/t/how-to-make-flow-wait-for-response-of-actionable-notification-no-retrigger/69465/2 "2022-10-23T21:06:18Z")

</div>

How will you determine the next time to send out the message?  
Does the washing machine send a msg when it is,done?  
You could use a gate node after the node where the notification comes in. Once a msg gets passed thru, close the gate.

The issue is determining when to reopen the gate. Maybe when you indicate the washer should run, set a timer for the length of the wash, then send a msg to the gate to re open.

But what happens if the electric rate goes up before you tell the washer to run, or if the rate goes up while it is running.

What if you miss the first notification, you will need a timer to reset the gate after a length of time if you haven’t replied.

BTW, what nodes are you using to get the rate and send the msg to iOS?

---

<div class="post-metadata">

**Author:** ![plimplamm](https://avatars.discourse-cdn.com/v4/letter/p/76d3ee/32.png) [@plimplamm](https://discourse.nodered.org/u/plimplamm)\
**Post date:** [24 October 2022 01:37 UTC](https://discourse.nodered.org/t/how-to-make-flow-wait-for-response-of-actionable-notification-no-retrigger/69465/3 "2022-10-24T01:37:50Z")

</div>

Thanks for the reply @zenofmud

I can make the washer send a message when completed, yes. This would take care of "when to send it next time".

How does a gate node work?

What about using a **critical notification** to ensure not to miss it (and make is persistent):  
Ref: [Critical notifications | Home Assistant Companion Docs](https://companion.home-assistant.io/docs/notifications/critical-notifications/)

To answer your questions: What if: i would not worry about those for now.

Currently I am using CALL\_SERVICE nodes (Home Assistant)

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [24 October 2022 09:40 UTC](https://discourse.nodered.org/t/how-to-make-flow-wait-for-response-of-actionable-notification-no-retrigger/69465/4 "2022-10-24T09:40:20Z")

</div>

> [@plimplamm](#):
>
> How does a gate node work?

best place to look is in the node's documentation see [node-red-contrib-simple-gate](https://flows.nodered.org/node/node-red-contrib-simple-gate)

Here is a simple flow showing how it works:

 ![Screen Shot 2022-10-24 at 5.39.36 AM](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/4/7/47a20663290f60b64b8be360e26c093a3a892fab.png)

```auto
[{"id":"b8777bb45a883fe0","type":"inject","z":"a28015d0574dbca4","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":140,"y":60,"wires":[["2409e9e194bacc83"]]},{"id":"544c85eb742490a1","type":"gate","z":"a28015d0574dbca4","name":"","controlTopic":"control","defaultState":"open","openCmd":"open","closeCmd":"close","toggleCmd":"toggle","defaultCmd":"default","statusCmd":"status","persist":false,"storeName":"memory","x":570,"y":140,"wires":[["cb97c09d16c64da0"]]},{"id":"8b15f49302c08e75","type":"change","z":"a28015d0574dbca4","name":"open gate","rules":[{"t":"set","p":"topic","pt":"msg","to":"control","tot":"str"},{"t":"set","p":"payload","pt":"msg","to":"open","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":340,"y":120,"wires":[["544c85eb742490a1"]]},{"id":"cb97c09d16c64da0","type":"debug","z":"a28015d0574dbca4","name":"debug 26","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":780,"y":140,"wires":[]},{"id":"2409e9e194bacc83","type":"trigger","z":"a28015d0574dbca4","name":"","op1":"1","op2":"0","op1type":"str","op2type":"str","duration":"250","extend":false,"overrideDelay":false,"units":"ms","reset":"","bytopic":"all","topic":"topic","outputs":1,"x":360,"y":60,"wires":[["550d654d2b728d34"]]},{"id":"550d654d2b728d34","type":"change","z":"a28015d0574dbca4","name":"close gate","rules":[{"t":"set","p":"topic","pt":"msg","to":"control","tot":"str"},{"t":"set","p":"payload","pt":"msg","to":"close","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":550,"y":60,"wires":[["544c85eb742490a1"]]},{"id":"f87b82817d7ac388","type":"inject","z":"a28015d0574dbca4","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":140,"y":120,"wires":[["8b15f49302c08e75"]]},{"id":"15d988adf9dbe9a5","type":"inject","z":"a28015d0574dbca4","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"1","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":150,"y":180,"wires":[["544c85eb742490a1"]]}]

```

as for the 'critical notivication' I'm not a Home Assistant user (nor are many here) so I can't help you with that part.

---

<div class="post-metadata">

**Author:** ![plimplamm](https://avatars.discourse-cdn.com/v4/letter/p/76d3ee/32.png) [@plimplamm](https://discourse.nodered.org/u/plimplamm)\
**Post date:** [28 October 2022 02:48 UTC](https://discourse.nodered.org/t/how-to-make-flow-wait-for-response-of-actionable-notification-no-retrigger/69465/5 "2022-10-28T02:48:40Z")

</div>

Thanks a lot! That solved my problem. Using it for other notifications too now.

Appreciate your help!

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [27 December 2022 02:48 UTC](https://discourse.nodered.org/t/how-to-make-flow-wait-for-response-of-actionable-notification-no-retrigger/69465/6 "2022-12-27T02:48:58Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
