# Zone variables

**URL:** <https://community.homey.app/t/zone-variables/69105>\
**Category:** Questions & Help\
**Tags:** flow\
**Created:** [September 19, 2022, 8:33am UTC](https://community.homey.app/t/zone-variables/69105 "2022-09-19T08:33:32Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![rxfc](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/rxfc/32/34041_2.png) [@rxfc](https://community.homey.app/u/rxfc)\
**Post date:** [September 19, 2022, 8:33am UTC](https://community.homey.app/t/zone-variables/69105/1 "2022-09-19T08:33:32Z")

</div>

So, before I post a request, like last time… maybe I’ve missed this too…

I’ve made an adv flow for my lighting that has all of my zones, individually “when zone kitchen changes to active” then “turn on al lights in zone kitchen”

Is there some shorter way? Like a “start card” that says; “when a zone changes to active” and then a variable is available with the zone name?

That way you would be able to make far simpeler flows; like:  
When a zone changed to active, turn on all lights in zone $var.

It would cover all the zones. With one statement, instead of having 10 individual “when” cards.

---

<div class="post-metadata">

**Author:** ![Peter\_Kawa](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/peter_kawa/32/173848_2.png) [@Peter\_Kawa](https://community.homey.app/u/Peter_Kawa)\
**Post date:** [September 19, 2022, 2:32pm UTC](https://community.homey.app/t/zone-variables/69105/2 "2022-09-19T14:32:13Z")

</div>

Take a look at the [Zone Memory](https://homey.app/nl-nl/app/com.sdn.zone-memory/Zone-Memory/) app,  
or,  
the [Device Capabilities](https://homey.app/nl-nl/app/nl.qluster-it.DeviceCapabilities/Device-Capabilities/) app, maybe when @Arie_J_Godschalk can implement zone activity listener one day?  
Something like this, Arie:

 ![Screenshot from 2022-09-19 16-30-54](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/0/0/00c64bc8c506a849782d8b33e03d61ed77198a90.png)

---

<div class="post-metadata">

**Author:** ![Arie\_J\_Godschalk](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/arie_j_godschalk/32/63027_2.png) [@Arie\_J\_Godschalk](https://community.homey.app/u/Arie_J_Godschalk)\
**Post date:** [September 19, 2022, 2:34pm UTC](https://community.homey.app/t/zone-variables/69105/3 "2022-09-19T14:34:35Z")

</div>

Yeah, that would be possible yeah.

---

<div class="post-metadata">

**Author:** ![Peter\_Kawa](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/peter_kawa/32/173848_2.png) [@Peter\_Kawa](https://community.homey.app/u/Peter_Kawa)\
**Post date:** [September 27, 2022, 3:22pm UTC](https://community.homey.app/t/zone-variables/69105/5 "2022-09-27T15:22:12Z")

</div>

Almost there, Arie. Now only if it is possible to add a tag field next to the zone dropdown, where the [last\_zone] variable can be selected… then it works. 🙃

 ![Screenshot from 2022-09-27 16-56-33](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/b/f/bffe0a38aeb947c52adb567eb0c33f63a3691d1b.png)

Thanks to the idea of Lammy: [Keep lights on where motion was last detected? - #14 by Lammy](https://community.homey.app/t/keep-lights-on-where-motion-was-last-detected/69147/14)

---

<div class="post-metadata">

**Author:** ![Arie\_J\_Godschalk](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/arie_j_godschalk/32/63027_2.png) [@Arie\_J\_Godschalk](https://community.homey.app/u/Arie_J_Godschalk)\
**Post date:** [September 27, 2022, 3:39pm UTC](https://community.homey.app/t/zone-variables/69105/6 "2022-09-27T15:39:57Z")

</div>

Hey Peter, send me the TEF for the flow?  
I’ll check what is in the zone.  
Or tell me, what is in the zone? An ID, Name?

---

<div class="post-metadata">

**Author:** ![Peter\_Kawa](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/peter_kawa/32/173848_2.png) [@Peter\_Kawa](https://community.homey.app/u/Peter_Kawa)\
**Post date:** [September 27, 2022, 4:56pm UTC](https://community.homey.app/t/zone-variables/69105/7 "2022-09-27T16:56:15Z")

</div>

Hi Arie,

The Zone variable holds the plain Zone name  
 ![Screenshot from 2022-09-27 18-55-22](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/b/3/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yD73/TBJVV9pg8KU6TGFzkvgFpAyiLlSjrF89LrvMJMUbgzMeTyckbsBto1uuerXroq1YKO0qrwXPqspEmGlguhFJRgJJanqv975EXQFx19LoRcfDhFPjXURzaiLE6iXcXuWWUrE0KD0D6rlLFIlkZo94R3GCInQOMyNvOH7TDMmJPpuDyJZpz2MY0nDyerQmTUE1b7lC4VqeEgU+CqsLlLS4HGwyng9TWjz0KIJXvx4yv2FuOk39eDMI8DaBjz491FCJ+qslLcVymRnXnDlfI5VyXRbF0lnSnfv1J83bG6Z7vQdTUVPI5Kgwymxw4bjG8z1sN6RoOP2AfHgp8xmq4t3vVkNGP9Bpnbh50Lty1rasovDt93SVTAu+RL9tUdbHcU0GC8vnzkalLKsfJSXno9eXxcPv4DWkdBBbwKAAA=]

```

---

<div class="post-metadata">

**Author:** ![Arie\_J\_Godschalk](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/arie_j_godschalk/32/63027_2.png) [@Arie\_J\_Godschalk](https://community.homey.app/u/Arie_J_Godschalk)\
**Post date:** [September 29, 2022, 8:11pm UTC](https://community.homey.app/t/zone-variables/69105/8 "2022-09-29T20:11:53Z")

</div>

@Peter_Kawa and @rxfc  
Okay, take a look at the [Test version](https://homey.app/nl-nl/app/nl.qluster-it.DeviceCapabilities/Device-Capabilities/test/):

 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/1/2/12dc28458f3aad8ffa71c215f85ca1a1fa22af4e.png)

There is the new card: Zone became Active/inactive/both.  
You can use the Set Capability Cards and plcae the Zone ID tag in the tag field.

---

<div class="post-metadata">

**Author:** ![Peter\_Kawa](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/peter_kawa/32/173848_2.png) [@Peter\_Kawa](https://community.homey.app/u/Peter_Kawa)\
**Post date:** [September 29, 2022, 10:05pm UTC](https://community.homey.app/t/zone-variables/69105/9 "2022-09-29T22:05:39Z")

</div>

Wow, that’s very neat!
