# Add a reset period to a variable

**URL:** <https://community.apilio.com/t/add-a-reset-period-to-a-variable/204>\
**Category:** Feature Requests\
**Created:** [10 October 2019 18:26 UTC](https://community.apilio.com/t/add-a-reset-period-to-a-variable/204 "2019-10-10T18:26:57Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![nikv](https://community.apilio.com/user_avatar/community.apilio.com/nikv/32/118_2.png) [@nikv](https://community.apilio.com/u/nikv)\
**Post date:** [10 October 2019 18:26 UTC](https://community.apilio.com/t/add-a-reset-period-to-a-variable/204/1 "2019-10-10T18:26:57Z")

</div>

The example I have is if a motion sensor picked up movement and IFTTT sets a variable setting to TRUE, then it would be good to have the option for it to reset back to FALSE if no activity. Perhaps an option to reset a variable to a default value after a specified period? This would be really useful.

---

<div class="post-metadata">

**Author:** ![pebneter](https://community.apilio.com/user_avatar/community.apilio.com/pebneter/32/56_2.png) [@pebneter](https://community.apilio.com/u/pebneter)\
**Post date:** [19 November 2019 16:20 UTC](https://community.apilio.com/t/add-a-reset-period-to-a-variable/204/2 "2019-11-19T16:20:58Z")

</div>

That’s a feature high on our priorities list and your solution would be definitely feasible. Thanks!  
We will consider various options and try to find a universal solution.

---

<div class="post-metadata">

**Author:** ![Anna](https://community.apilio.com/user_avatar/community.apilio.com/anna/32/72_2.png) [@Anna](https://community.apilio.com/u/Anna)\
**Post date:** [19 October 2020 07:41 UTC](https://community.apilio.com/t/add-a-reset-period-to-a-variable/204/3 "2020-10-19T07:41:18Z")

</div>

Hi @nikv!

Last month we updated our delays and timeout feature and you’ll be able to effectively do a “reset” as you describe by using a timeout in your condition that is watching your boolean variable. Instead of changing the information you have from your sensor (the info stored in your variable), you state the amount of time that your condition should consider that information as valid.

I wrote an example using a motion sensor that might be helpful:

> [@Timeout and presence sensors: turn on a light when someone is at the door](https://community.apilio.com/t/timeout-and-presence-sensors-turn-on-a-light-when-someone-is-at-the-door/1113):
>
> @jrmckins shared a very common home automation example in his blog last year: turning on a light for a while if someone is at the door. Presence sensors are tricky because they only ever send one event. With Apilio’s latest changes to our conditions, you’ll be able to “reset” what your presence sensor is telling you to make your routine really smart. The setup is as follows: If it’s between Sunset and Sunrise (it’s dark outside) and if motion is detected at the front door then turn on the po…

And here is the full article explaining how these time constraints for conditions are setup:

> [@How to setup time constraints for Conditions: delays and timeouts](https://community.apilio.com/t/how-to-setup-time-constraints-for-conditions-delays-and-timeouts/1077):
>
> With Apilio you can add delays and timeouts to some of your Conditions, so you can make your setup smarter: What if you have a presence sensor that only sends the one event when it detects someone, and nothing else? How do you know that nobody is in the room if there is no “idle” event? Or what if you have a sensor that sends lots of false positives. How do you know when it has finally settled on a value? Apilio is here to help! robot heartpoint_right When to add a delay to your Condi…

Let us know if this helps! 🙂 thanks!
