# How to use a tag for a date/time flow?

**URL:** https://community.homey.app/t/how-to-use-a-tag-for-a-date-time-flow/104955
**Category:** Questions & Help
**Created:** [February 26, 2024, 2:07pm UTC](https://community.homey.app/t/how-to-use-a-tag-for-a-date-time-flow/104955 "2024-02-26T14:07:21Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Sinan\_Samet](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/sinan_samet/32/101246_2.png) [@Sinan\_Samet](https://community.homey.app/u/Sinan_Samet)
#### Post date: [February 26, 2024, 2:07pm UTC](https://community.homey.app/t/how-to-use-a-tag-for-a-date-time-flow/104955/1 "2024-02-26T14:07:21Z")

</div>

I wrote a HomeyScript that returns the time as for example 15:04. I want to use this time to trigger a flow. So if time === timeTag → execute flow. Maybe I’m thinking too hard and there is an even easier way but I’m a noob still in Homey. Can anyone help me out with this? The time returned comes from an API so it is dynamic.

---

<div class="post-metadata">

### Author: ![Theo\_de\_Koning](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/theo_de_koning/32/136062_2.png) [@Theo\_de\_Koning](https://community.homey.app/u/Theo_de_Koning)
#### Post date: [February 26, 2024, 3:34pm UTC](https://community.homey.app/t/how-to-use-a-tag-for-a-date-time-flow/104955/2 "2024-02-26T15:34:44Z")

</div>

This wish has been with me for some time now.  
For me to be able to choose the sunrise and sunset times.  
There is now too much difference between those times between apps and Homey itself.  
So both can choose, either the … : … or a tag

Time line. (little edit for clarity)  
26-02-2024 **07:40** by sunrise cart  
The Tag under date & Time gives **07:37**  
feb. 26 2024 07:40:00

The sunset is now the same but can also have to 3 minutes differences.

---

<div class="post-metadata">

### Author: ![Sinan\_Samet](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/sinan_samet/32/101246_2.png) [@Sinan\_Samet](https://community.homey.app/u/Sinan_Samet)
#### Post date: [February 27, 2024, 9:27am UTC](https://community.homey.app/t/how-to-use-a-tag-for-a-date-time-flow/104955/3 "2024-02-27T09:27:59Z")

</div>

I managed to find an earlier posted solution for this:

> **[Set a clock time and trigger on the set time](https://bitbucket.org/QlusterIT/nl.qluster-it.chronograph/issues/4/set-a-clock-time-and-trigger-on-the-set)**
>
> I would like to be able to set an alarm clock time type of time based on previous conditions and then trigger when that alarm clock goes off. I.e a dynamic cron job for flows.
> 
> For example I have now a dynamic timer to delay the start of an other...

Basically what you do is:

- Set an alarm in the Homey app on your phone
- Use the script below to update the alarm (I trigger this script on sunrise). You can get the time from wherever you want in this script. I got the data from an API.

```auto
let alarms = await Homey.alarms.getAlarms();
let alarm = _.find(alarms); // first
await Homey.alarms.updateAlarm({id:alarm.id, alarm: {time:'20:19'}});

```

Then trigger an action when this alarm goes off.

It’s a workaround but it works.
