Restart delay / kill previous flow instances

I am new so hello and thanks for your help!

I have a simple situation and can’t find a solution. :slight_smile:

I want a flow to turn off my TV in 30 minutes after manually triggering it (I like to fall asleep with TV on, but want it to turn off later).

If I am still watching the TV after let’s say 20 minutes (i.e. at any point during the countdown), I want to start the same flow again and restart the countdown for another 30 minutes. However, the previous flow instance will stay active and it will shut down the TV after first 30 min regardless.

What would be the most elegant way to “kill” a previously activated flow instance and make the last one triggered the only one active?

I feel the solution should be simple?

Thanks in advance!

You could use two flows: one to (re)set a countdown timer and another one that takes action when the timer reaches Zero.

Make a virtual button like below

Make two flows, WHEN virtual button turned on THEN start timer 30 min

Second flow WHEN timer is zero THEN TV off

Put this virtual button in your favourite devices

As the others have already said correctly, you can not avoid using a timer.

You can not cancel a running flow. Except with a home reboot or PTP.
It would be much easier if flows could be stopped and only one flow instance would run.

Thank you all for the replies,

I will have to look in the timer apps then. It is really weird that Athom went through all the effort to implement “Disable flow” which I never use and didn’t add “Stop flow” or at least an option to force only one instance of the flow to be active. This would also help in having less flows per task, optimising the memory management, avoid problems when accidental loops are created etc.

Well, I can always hope it will be implemented once…

1 Like

Don’t forget to send a Feature Request to Athom.
Because Athom isn’t present here.

1 Like

Flows with timer are much more useful then killing the flow. Timer is the must app to ave. I was missing the easy timer functionality in Fibaro.
Enabling or disabling the flow is usefull as well. You can easily deactivate/activate flows (routines) with single virtual press button.

1 Like

Disabling is not the same as stopping. Deactivation only prevents re-triggering of the flow.

If you deactivate a running flow (delayed actions), the actions will still be executed after the delay has expired.

If it were possible to stop a flow and re-trigger a flow without starting another instance of the flow, you could save many flows.

I agree with you, timers are essential. Without timers, many automations would be impossible. The more incomprehensible it is, why you need a separate app?

1 Like

Hi Marcel, I am just looking to create a virtual button, but I do not see the three virtual devices that you show in the screenshot, only the three communication methods. I am a newby to Homey (just received it this week). Do I need to set some option somewhere or have they been removed since you took the screenshot?

Sorry, just found it in another topic: I had to enable them in settings/ experimental features.

I’ve got the same problem. But it seems I’ve found a solution. There is an app called CountDown. With it’s help you set up a timer (1 second per tick) and on certain events you just restart it, and there is a condition ‘If Timer reaches (0)’, so you can use it for your flows.
I got a case when my camera doesn’t detect any motion in the hall or any sound, then another flow:
‘Turn on the light in the hall when main door gets opened’.