# Timestamp as variable – idea to improve Homey Cloud logic significantly

**URL:** <https://community.homey.app/t/timestamp-as-variable-idea-to-improve-homey-cloud-logic-significantly/63233>\
**Category:** Ideas & Suggestions\
**Tags:** app, homey-pro, homey-bridge\
**Created:** [May 1, 2022, 8:22pm UTC](https://community.homey.app/t/timestamp-as-variable-idea-to-improve-homey-cloud-logic-significantly/63233 "2022-05-01T20:22:47Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Martin\_K](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/martin_k/32/47966_2.png) [@Martin\_K](https://community.homey.app/u/Martin_K)\
**Post date:** [May 1, 2022, 8:22pm UTC](https://community.homey.app/t/timestamp-as-variable-idea-to-improve-homey-cloud-logic-significantly/63233/1 "2022-05-01T20:22:47Z")

</div>

Hi!

Working with **time** ⏲ ⏳ in flows opens up **tons** of new possibilites… 🚀

On **Homey Pro** , there are multiple ways to work with chronometers/stopwatches/timers/… – put simply: time.

But on **Homey Cloud (and Bridge)**, there is no app which helps here.

**My suggestion:**  
Add a native action (“then”) which stores the current time in a variable, in some standardized format which allows to substract or add seconds, minutes, hours from/to.

With a simple Blog article, you folks could then explain how to do certain calculations, like _“IF/WHEN current time is XX larger than variable [time when user A went away]”, THEN do something"_.

**Examples:**

- Warn if a window was opened and **not** closed after X minutes.
- Turn lights on to the previously set brightness, **only if** turning the lights off was less than 30 minutes ago.
- Turn a device (plug or light) on with a **delay** after an event happened.  
…

Or is there an alternative approach which I might have missed? (talking about Cloud & Bridge here 🙂)

It seems not so much of a challenge, technically.

Hoping 🙏 for a comment (and more):  
Martin

---

<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:** [May 1, 2022, 9:29pm UTC](https://community.homey.app/t/timestamp-as-variable-idea-to-improve-homey-cloud-logic-significantly/63233/2 "2022-05-01T21:29:17Z")

</div>

It has less possibilities than a Pro for a reason I think (€€€)🙃

> [@Martin\_K](#):
>
> Turn a device (plug or light) on with a **delay** after an event happened.

That’s possible  
(“Na 45 sec” is Dutch for _After 45 sec_)

 ![Screenshot_20220501-232705_Homey](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/f/c/fc4bec7d8f7ad2241652b7fdd844b9e59954476f.jpeg)

> [@Martin\_K](#):
>
> Warn if a window was opened and **not** closed after X minutes.

(If it is closed within 5mins, no warning is sent.)  
(read “is aan” for _is open_)

---

<div class="post-metadata">

**Author:** ![Martin\_K](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/martin_k/32/47966_2.png) [@Martin\_K](https://community.homey.app/u/Martin_K)\
**Post date:** [May 1, 2022, 9:55pm UTC](https://community.homey.app/t/timestamp-as-variable-idea-to-improve-homey-cloud-logic-significantly/63233/3 "2022-05-01T21:55:29Z")

</div>

I totally forgot the “Delay” feature! Thanks, @Peter_Kawa! Also for the example flows!  
Will play around with this approach more.

Although this won’t make everything possible and it seems like a hack, too, even where it does help. So, I’m still hoping for a dedicated _“store timestamp in variable”_ system – which would have quite a high benefit for a relatively small (development) investment.

I also don’t think Cloud/Bridge has less possibilities _ **because of the price** _, but instead only because:

1. it is new (incl.: not so many users YET)
2. some functionalities are harder to implement

What do you think?  
In any case: It will be interesting to see how Cloud/Bridge will evolve! 🙂

Best  
Martin

---

<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:** [May 1, 2022, 10:11pm UTC](https://community.homey.app/t/timestamp-as-variable-idea-to-improve-homey-cloud-logic-significantly/63233/4 "2022-05-01T22:11:56Z")

</div>

Your welcome, Martin. Using the flowcard delay option, combined with logics provides for some options.  
It’s a pity one cannot save the timestamp and do calculations with it on both Homey types.  
For the Pro (only) are lots of “[tools category](https://homey.app/nl-nl/apps/browse/#filter?category=tools&platform=local)” apps available, but most of them will not be allowed on Homey cloud.  
F.i. HomeyScript can calculate with timestamps, but that’s another level (pure coding).

> [@Martin\_K](#):
>
> Turn lights on to the previously set brightness, **only if** turning the lights off was less than 30 minutes ago.

This is also possible, but for a regular consumer it is too complicated or abstract maybe.  
I thought of someting like this, flipping a variable after 30 minutes:
