# 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:** 1\
**Showing post:** 3

<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!

---

_[View the full topic](https://community.apilio.com/t/add-a-reset-period-to-a-variable/204)._
