# Q: How to get zone activity from script?

**URL:** <https://community.homey.app/t/q-how-to-get-zone-activity-from-script/69734>\
**Category:** Flows\
**Tags:** homeyscript\
**Created:** [October 2, 2022, 7:46am UTC](https://community.homey.app/t/q-how-to-get-zone-activity-from-script/69734 "2022-10-02T07:46:44Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![JeeHaa](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/jeehaa/32/29849_2.png) [@JeeHaa](https://community.homey.app/u/JeeHaa)\
**Post date:** [October 2, 2022, 7:46am UTC](https://community.homey.app/t/q-how-to-get-zone-activity-from-script/69734/1 "2022-10-02T07:46:44Z")

</div>

To verify if a zone hasn’t been active recently I am trying to figure out an AND condition: “Zone X has not been active in the last Y minutes”.  
I can find triggers for “Zone is inactive for…”, but that is obviously an event that fires only once, not a condition you can use in an AND Logic card.

So I’m looking to get the value of “X minutes ago” for a specific zone, similar to:  
 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/2/e/2eb97d34d3d33a6c43e048aaa81d922adae376a5.png)

Does anyone know a script snippet to get this value and put it in a tag?

---

<div class="post-metadata">

**Author:** ![JPe4619](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/jpe4619/32/9017_2.png) [@JPe4619](https://community.homey.app/u/JPe4619)\
**Post date:** [October 3, 2022, 12:18pm UTC](https://community.homey.app/t/q-how-to-get-zone-activity-from-script/69734/2 "2022-10-03T12:18:50Z")

</div>

You probably beter use the Trigger “Zone is inactive…” and use your other Condition in the AND card. Don’t think the information you mention is available.
