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

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.

1 Like

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.

I managed to find an earlier posted solution for this:

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.
let alarms = await Homey.alarms.getAlarms();
let alarm = _.find(alarms); // first
await Homey.alarms.updateAlarm({, alarm: {time:'20:19'}});

Then trigger an action when this alarm goes off.

It’s a workaround but it works.

1 Like