# Get historic variable value

**URL:** <https://community.homey.app/t/get-historic-variable-value/79120>\
**Category:** Questions & Help\
**Tags:** homeyscript, insights\
**Created:** [April 10, 2023, 3:15pm UTC](https://community.homey.app/t/get-historic-variable-value/79120 "2023-04-10T15:15:29Z")\
**Posts on this page:** 1\
**Showing post:** 5

<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:** [November 16, 2023, 5:58pm UTC](https://community.homey.app/t/get-historic-variable-value/79120/5 "2023-11-16T17:58:06Z")

</div>

With a little D-tour:  
The [Device Capabilities app](https://community.homey.app/t/app-pro-device-capabilities-enhance-the-capabilities-of-devices/43287) has the perfect flowcard, and you can emulate it in Hscript

> ![Screenshot_20231116-184340_Chrome](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/b/d/bdfc15567f1dc7caa23d826d2c35c39cfc197255.jpeg)

Explained:

> ![Screenshot_20231116-184424_Chrome](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/9/5/957c068cd887d5c6135e4ac77abe0850c13bc88b.jpeg)

You can emulate most AND & THEN flowcards in Homeyscript.  
Check `example-flowcard-run` on how to do that.  
_Now, when you haven’t already, install Device Capabilities app first_  
When you run `example-flowcard-list` it will return all And & Then cards available on _your_ Homey → you can search for the Device Capabilities card ‘Then’ ‘Retrieve the insights value from’  
(_this script can take quite a while to finish, remove the ‘And’ part in order to show the ‘Then’ part results way more quicker_)

 ![Screenshot_20231116-184922_Firefox](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/a/2/a2818a6d1e5a8a3afbde90c4c13c94a443e1451c.jpeg)

---

_[View the full topic](https://community.homey.app/t/get-historic-variable-value/79120)._
