Run a flow only once, triggered by a motion detector

Hi there I struggle to get a flow running just once a day - this flow is triggered by a Motion detector from Neo coolcam. It triggers a flow to power on lights in my home when the motion detector detects motion between 0600-0800 am. So when i get up , some lights should power on. From that moment the motion detector could detect more motion because it is in the hallway but it ahould not start the flow over and over again.

So how could I limit this flow just once a day?

You could create a flow every day at, say, midnight that sets a Boolean variable to yes.

Your flow would test the variable and switch on the lights only if it was yes. It would then set the variable to no.

1 Like

I cannot see the problem the flow running again. But you might add an AND card “if dimmer gang 3 is off”. In that case the flow stil starts, but will not execute the THEN part.

1 Like

How about deactivating the flow as last step and activating it with an extra flow later again thus no need for a variable.

1 Like

I dont want to start over the flow again and again because:

  • it triggers another flow which sets the both lights / dimmers to a level we want to have it. So every time this flow starts, lights go to 100% and then dim to e.g 30%

And starting directly with “dim to xx%”?

@Chrisvr254

You should use this flow to only turn on the two lights, not run the two flows.

Make one or, even better, two other flows that start with a WHEN card

  1. WHEN this gang light turns on, THEN start Sfeerlicht Gang
  2. WHEN this Keuken light turns on, THEN start Sfeerlicht Keuken
2 Likes

I think that the idea of @SingKT is the most easy.
When there is movement between 6:00-8:00 start the flow and add a card with a delay of 5 seconds or so with “deactivate flow xxx”
Later that day you can start a flow with
IF time is yyy hour
THEN Activate flow xxx

What solution is best can only be decided when you know all other flows, i.e the flows that switch off the lights.

@Mike1233 Disabling a flow is very messy. Enabling it at a certain time presumes a very static behaviour.

Chris claimed he does not want to start the flow twice, but in general he should build his motion triggered flows such that the least work possible is done and they can be repeated each time there is motion.

And what is the problem if he only uses it only on time a day?
His flow should work between 6:00-8:00.
If the flow is triggerd at 6:05 and then disable the flow till, let’s say, 8:01, then he has reached his goal.
There are other way’s and this is one of them.
I don’t say he has to use it.

Thanks, this makes sense yes. But my concern now is, should homey have logic in this flow e.g.

When turned on, do not turn on again every time the motion detects between 06:00-08:00?

Tell us more?

You have many options: disabling the flow is only one.

When the light turns off (eg when zone inactive 5min or if the light turns off) you can set a blocking variable until 8.

I’m sorry maybe I misunderstood your concern. This specific question has only one answer.

Best practice is to have motion flows that turn on a light, when the light is off. This prevents needless actions.

I don’t think the lights are only switched on in the morning. So there will be more flows interacting with the lights. So the problem might be in more flows.
I can only tell you more if all flows are known.
However, only switching a light on when it it is off is a general role of thumb.