# Get updated values from device

**URL:** <https://community.homey.app/t/get-updated-values-from-device/73499>\
**Category:** Developers\
**Tags:** homeyscript\
**Created:** [December 12, 2022, 6:10pm UTC](https://community.homey.app/t/get-updated-values-from-device/73499 "2022-12-12T18:10:02Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Evero](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/evero/32/56405_2.png) [@Evero](https://community.homey.app/u/Evero)\
**Post date:** [December 12, 2022, 6:10pm UTC](https://community.homey.app/t/get-updated-values-from-device/73499/1 "2022-12-12T18:10:02Z")

</div>

Apologies if this has been answered already, I’ve searched all over and can’t seem to find the answer - if it exists.

I’m reading values for a Unifi device, and I see that only the “connected” value is fresh. Ideally I would like to be able to do things like turn on out door lights only if I’m close enough to AP a or b, but obviously that’s impossible when measure-levels are not updating. Example from a polling below:

```auto
{
  value: 35,
  lastUpdated: '2022-12-08T19:38:12.292Z',
  type: 'number',
  getable: true,
  setable: false,
  title: 'RSSI',
  desc: null,
  units: '%',
  min: 0,
  max: 100,
  step: 1,
  iconObj: {
    id: '415d4c317fab675c05e5c1aa2120bd4c',
    url: '/icon/415d4c317fab675c05e5c1aa2120bd4c/icon.svg'
  },
  id: 'measure_rssi',
  options: {},
  values: undefined
}

```

Is there any way to force an update of this capability?

---

<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:** [December 12, 2022, 7:01pm UTC](https://community.homey.app/t/get-updated-values-from-device/73499/2 "2022-12-12T19:01:27Z")

</div>

Retrieve the device again through the api, then you get the updated capability value.

---

<div class="post-metadata">

**Author:** ![Evero](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/evero/32/56405_2.png) [@Evero](https://community.homey.app/u/Evero)\
**Post date:** [December 12, 2022, 7:06pm UTC](https://community.homey.app/t/get-updated-values-from-device/73499/3 "2022-12-12T19:06:24Z")

</div>

How can I do that without deleting and pairing with the device again?

The status page for the device shows the same “4 days ago” values, and the only changeable setting is power usage

---

<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:** [December 13, 2022, 5:48am UTC](https://community.homey.app/t/get-updated-values-from-device/73499/4 "2022-12-13T05:48:13Z")

</div>

> [@Evero](#):
>
> The status page for the device shows the same “4 days ago” values,

Sounds like you’re trying to solve an app issue with HomeyScript, which won’t work. It’s the responsibility of the app to retrieve values and update capabilities.

---

<div class="post-metadata">

**Author:** ![Evero](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/evero/32/56405_2.png) [@Evero](https://community.homey.app/u/Evero)\
**Post date:** [December 13, 2022, 8:29am UTC](https://community.homey.app/t/get-updated-values-from-device/73499/5 "2022-12-13T08:29:20Z")

</div>

> [@robertklep](#):
>
> Sounds like you’re trying to solve an app issue with HomeyScript, which won’t work. It’s the responsibility of the app to retrieve values and update capabilities.

I was afraid this would be the case. Marked as the solution
