# Retrieve current zone from a custom view of a driver

**URL:** <https://community.homey.app/t/retrieve-current-zone-from-a-custom-view-of-a-driver/90797>\
**Category:** Developers\
**Tags:** app, homey-pro\
**Created:** [October 2, 2023, 7:11pm UTC](https://community.homey.app/t/retrieve-current-zone-from-a-custom-view-of-a-driver/90797 "2023-10-02T19:11:07Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Baldhor](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/baldhor/32/27028_2.png) [@Baldhor](https://community.homey.app/u/Baldhor)\
**Post date:** [October 2, 2023, 7:11pm UTC](https://community.homey.app/t/retrieve-current-zone-from-a-custom-view-of-a-driver/90797/1 "2023-10-02T19:11:07Z")

</div>

Hello,

The SDK announce and expose a function to retrieve the current zone:

> **[Custom Pairing Views](https://apps.developer.homey.app/advanced/custom-views/custom-pairing-views#get-current-zone)**
>
> Most drivers will suffice using the provided pairing templates. Some advanced drivers however can benefit from creating their own views.

I’m calling it from a custom view of a driver.  
However, all I get in answer of this function is null !

Any idea?

---

<div class="post-metadata">

**Author:** ![robertklep](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/robertklep/32/160628_2.png) [@robertklep](https://community.homey.app/u/robertklep)\
**Post date:** [October 2, 2023, 7:16pm UTC](https://community.homey.app/t/retrieve-current-zone-from-a-custom-view-of-a-driver/90797/2 "2023-10-02T19:16:02Z")

</div>

I’m guessing that this might only work in a Repair view, since when creating a new device it isn’t assigned to a zone yet.

---

<div class="post-metadata">

**Author:** ![Baldhor](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/baldhor/32/27028_2.png) [@Baldhor](https://community.homey.app/u/Baldhor)\
**Post date:** [October 2, 2023, 7:22pm UTC](https://community.homey.app/t/retrieve-current-zone-from-a-custom-view-of-a-driver/90797/3 "2023-10-02T19:22:50Z")

</div>

> [@robertklep](#):
>
> this might only work in a Repair view, since when creating a new device it isn’t assigned to a zone yet.

The function is described in the custom driver view documentation …

---

<div class="post-metadata">

**Author:** ![robertklep](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/robertklep/32/160628_2.png) [@robertklep](https://community.homey.app/u/robertklep)\
**Post date:** [October 3, 2023, 4:13am UTC](https://community.homey.app/t/retrieve-current-zone-from-a-custom-view-of-a-driver/90797/4 "2023-10-03T04:13:39Z")

</div>

Yes, and the Repair documentation refers to that:

 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/d/d/dd1b32664595bceaa08b47aa90da6cd953fa2b38.png)
