# Check when value was updated

**URL:** <https://community.homey.app/t/check-when-value-was-updated/73413>\
**Category:** Developers\
**Created:** [December 11, 2022, 9:34am UTC](https://community.homey.app/t/check-when-value-was-updated/73413 "2022-12-11T09:34:18Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tester22](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/tester22/32/30854_2.png) [@Tester22](https://community.homey.app/u/Tester22)\
**Post date:** [December 11, 2022, 9:34am UTC](https://community.homey.app/t/check-when-value-was-updated/73413/1 "2022-12-11T09:34:18Z")

</div>

Hi,

I have an app that among other things have an battery alarm.  
Unfortunately the device implementation is implemented so that an battery alarm is triggered by an negative power measure.  
This means that when the alarm is triggered it is restored the next time an power measure is sent.

Is there any way to check the last time an value was set by an app and what value it have.  
I would like to check if the value equals x and if it was updated in the last 30 min to prevent spammy messages to the user.

---

<div class="post-metadata">

**Author:** ![Tester22](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/tester22/32/30854_2.png) [@Tester22](https://community.homey.app/u/Tester22)\
**Post date:** [December 12, 2022, 6:07am UTC](https://community.homey.app/t/check-when-value-was-updated/73413/3 "2022-12-12T06:07:30Z")

</div>

But this is an app not an flow

> **[Tempiro](https://homey.app/sv-se/app/com.tempiro/Tempiro/)**
>
> Smart Heating Made Easy

Not sure how it would be possible to automatically create an flow from the app.

---

<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, 11:39am UTC](https://community.homey.app/t/check-when-value-was-updated/73413/4 "2022-12-12T11:39:04Z")

</div>

Does the app value has an insights or an token?

---

<div class="post-metadata">

**Author:** ![Tester22](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/tester22/32/30854_2.png) [@Tester22](https://community.homey.app/u/Tester22)\
**Post date:** [December 12, 2022, 6:35pm UTC](https://community.homey.app/t/check-when-value-was-updated/73413/6 "2022-12-12T18:35:39Z")

</div>

I am the app developer 🙂  
The problem is that the device have an hacky way to report battery level.

> <https://github.com/tester22/com.Tempiro/blob/main/drivers/smart-fuse/device.js#L74>

If value is -10 or -30 the battery is triggerd. There is no way to get the actual value just the alarm state.  
The problem is that if there is an actual power reading (occurs all the time) alarm should be resolved.

My plan was to have some logic so if the alarm battery is active I do not make any changes until it have been resolved for x minutes.

---

<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:** [December 12, 2022, 6:58pm UTC](https://community.homey.app/t/check-when-value-was-updated/73413/7 "2022-12-12T18:58:45Z")

</div>

I didn’t read “I have an app” as “I’ve build app XYZ, and …”  
Can’t help you out with app editing.
