[Flow] Start flows at beginning of a period, last day of this period and last day + 1


#1

Hello,

I want to define a period of time (start date and end date) in only one card (easier to modify) like:

periodCard:

  • start date: 8h00 - 17/10/18
  • end date: 20h00 - 20/10/18

firstDayPeriodCard:

  • If motion sensor started then lights on

lastDayPeriodCard:

  • If doorlock is locked, no motion for 3 hours then lights off

+1DayPeriodCard:

  • If no motion for 10 hours then start cleaning

At this point, I’ve got something like this (with the help of Maikel):

But I don’t know how to trigger things at the end and end +1 of this period :frowning:

Any ideas for me ?

Have a nice evening !

Julien


#2

Any ideas ? :grinning:


#3

Yes.

Unpossible.

U can make flows with the trigger “This flow is started”.
Then u can make the flow like above and instead of “Enable a flow” u could use “Start a flow”
Then u have ur trigger.


#4

Hello !

Thank You for feedbak !

Is it possible to calculate thé différence between two dates (in seconds) and use this as a delay to start a flow ? (I don’t know if I’m clear enough)

Enjoy your weekend !

Julien


#5

3.5 days = 84 hours in seconds still 84 hours delay? What do you want to start delayed with 84h?
Pls describe what you want to accomplish for a scenario not the way you thought but didn’t finish.

Edit:
your Period Card is a condition, either date between or time between, but not date&time between other date&time. if you use both cards it will have impact it wont run any night.
If you want to enable / disable something over a long time you need two flows / two triggers each with a date/time one start to enable and one end to disable. or a schedule (2 x an alarm) or one of the 3rd party apps (maybe possible with Homedall? or… I don’t know.).

The enable/disable can be a Tag or Virtual Switch. (HouseIsRented = true)

Flow 1: Enable When Time (or an Alarm Start) , then HouseIsRented = true
Flow 2: Enable When Time (or an Alarm Stop) , then HouseIsRented = False,

Other Flow: When Motion detected, and HouseIsRented=True and between xxh - yyh, then Lights On and Start CountDown Light 3h and Start CountDown Cleaning 10h

Other Flow: if CountDown Light = 0 and Door is Locked, Lights Out, (? Why 2h59 after locking the door? but Ok.)

Other Flow if CountDown Light = 0 and HouseIsRented=False then Start Cleaning (this can trigger more often if there is motion, but add a counter to stop triggering if you want.)

This last one will not trigger if there is last motion more than 10 h before end period. but you can fix that…


#6

Hey Dijker,

I’m searching the easiest way to start flows at the begining of a period, start flows at the end of that period and start flows at the end of the period + 1 day :slight_smile:

thank you,

Julien


#7

Flows don’t run continuously, they start on an event.
That could be a change in a value (fe Temperature, energy, light), an alarm (Motion, fire, a set Alarm Time/Day) or an other state change (Presence) or at a certain time (a date, a time each day, sun up/down, every xx seconds/minutes/hours…)

There is no easy way to put your request in one flow at the moment.

The only way to trigger from the start of one flow on a 2nd and 3rd time is to start something (fe Countdown) that creates new events (CountDown Timer reaches 0 ) where other flows trigger on.


#8

Thank you a lot for information Dijker !
07
I’ve done something like that and I’ve just to change ‘Date check-in’ and ‘Date check-out’ :slight_smile:

Maybe I’ll find a solution to trigger whit iCal directly !

Have a nice weekend,

Julien