# Trying to acctivate the thermostat through 3 different times frames of the day

I have a hard time with this one.

I have a backdoor with a fibaro door sensor and a atag one thermostat. The atag thermostat has three different temp schemes during the day. 0800- 1600 20’C, 1600-0000 22’C and 0000-0800 18’C.

Now everytime the backdoor is opened longer than 5 minutes the atag needs to go down to 16’C and when the door is closed again it needs to go back to the temperature according to its time frame.

But when the door is opened within this 5 minutes the temperature does not need to change.

Now i am so far that when the door is opening and 5 minutes later the door is closing everything is going according to the plan. But only for 2 time frames, cause i could not figure out how to set 3 time frames. So for the moment i have set it to 0000-0800 18’C and 0800-0000 20’C.

But when the door is opening and closing within the 5 minutes time frame the temp goes back to 20’C everytime.

Is there a way to figure this out cause at the moment i am on a dead end.

Maybe something like
Flow1: WHEN this flow is started AND time is between 0800 and 1600 THEN set temp to 20 ELSE start flow 2
Flow2: WHEN this flow is started AND time is between 1600 and 2359 THEN set temp to 22 ELSE set temp to 18.
I made a timer for it. Maybe u also done this and u can forget it ofc.
WHEN door opens start timer for 5 minutes.
WHEN door closes stop timer.
WHEN timer empty start Flow1

Yes this was it, many thanks.
Only thing i have different flows for door open.And have a logic variable for the door.

timer:
when contact is on then start timer

door open:
when timer is empty and contact is on then temp to 16, put logic to yes.

So maybe now everybody can enjoy this one.

1 Like