Set a clock time and trigger on the set time

Issue #4 resolved
Tapio Heiskanen created an issue

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 flow based on what is outside temperature. The colder it is outside the earlier the next flow should start.

It would be easier to tell the flow to start at a given time. Also I would like to keep the amount of installed apps at minimum to simplify the maintenance of Homey.

Comments (6)

  1. arie repo owner

    Hey Tapio,

    I’m not sure that i get what you want.

    Do you want:

    • A trigger/When where you can set a time
    • Action/Then cards to adjust the time set in the Trigger above

    Is that what you are talking about?

  2. arie repo owner

    Yeah that would be possible, but where would you show the actual configured time?

    it cannot be shown in the trigger/when card: i cannot update that from an app.

    so I guess you would need a Alarm device with a trigger and set-time-card. Right?

  3. arie repo owner

    Hey Tapio,

    I think there is a better solution already:

    Use the build-in Alarms (Wekkers).

    You can access them from the Homey Mobile App, under settings.

    There are trigger cards for them.

    To update a trigger, use HomeyScript:

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

  4. Tapio Heiskanen reporter

    Thanks for the idea, though the HomeyScript would make it a bit too complex. Then again I should be able to give the alarm time as an argument for it to be dynamic controlled from flows.

  5. Log in to comment