Configurable time trigger

I would like to have an option to set a certain time, f.e. 17:00 and than have Homey count backwards the time needed to charge my car, in order to start charging in time.

However, this is not the problem, I can create flows for that; what I’m looking for is how to have easy access to set a (any) time (17:00 in this example) without having to browse to a flow and edit the flow.

If f.e. it would be possible to create and set a time variable (which is not possible), I could set the variable to the time I need the car to be fully charged.

I’m surely overlooking some easy option, but I don’t see any way to do this.

If it would charge within 120 minutes I would go for a Alarm (expecting you to use a Homey Pro, na for Homey (beta) )

But I am afraid you need more time and this is a limitation in the Flow Trigger.
( Or maybe you just need Faster Chargers :wink: )

never used an alarm (always thought; why the hell would I want to set an alarm in Homey with all the alarms on my phone, watch etc)…

Maybe underestimated the functionality, so this might be a use case. I’ll see whats possible with alarms

Alarms are not what I’m looking for.

My usecase:

  • set a time to leave (i.e. the time I need to get in my car)
  • have Homey calculate back the time to start charging, based on the “chargingtime left” (number of minutes) value that the car reports
  • start charging on “time-to-leave” -/- “chargingtime left” = “start charging time”

I don’t see any way to easily set a specifica time (other than the alarms), and I don’t see any way to calculate “time (hh:mm)” minus “x minutes” = “wanted time”

Anyone point me in the right direction?

Maybe here are some useful ideas:

The app which could possibly do this, is
Flow Utilities, I’ve given the devs your usecase, maybe they’ll know a way…

1 Like

Thanks @Peter_Kawa for letting us know about this case. We are going to investigate how Flow Utilities can help with that.

We will share the results on our topic: [APP][Pro] Flow Utilities - #110 by Peter_Kawa


Not used by myself, but, may-be the IcalCalendar App for Homey | Homey is a possibility? I think there are also other integrations with (different)calendars/planners. Just set a event “I need a car”, and if this event appears in calendar, then Homey picks it up.

Yeah, another possibility is to do some dashboard with special features… or use some time capable (virtual) device.

1 Like

Could it be done with Better Logic, specifically the Mathjs cards?

Say I need to leave at 17:00, and my car needs 3 hours to charge to full (according to the car), I need the car to start charging at 14:00

I don’t really need to work with times; if I use numeric times, 1700 instead of 17:00, I can calculate ((1700*60/100)-(180))/0.6 = 1400

I only need a flow that, f.e. every 5 minutes, converts current time to a number and if that number > 1400, start charging.

I found $timenow$ to convert current time to a number, I basically need $timenow$ epoch - current date epoch (today 0:00 epoch) which gives me the numeric time to compare to 1400

Anyone know how?

edit: okay, found a solution using Better logic, need to test but I think this works

Calculate epoch for “today 0:00”
Maybe this can be done in the next step but I don’t know the Mathjs to get “today 0:00” epoch

Calculate epoch $timenow$ to current time (HH,MM) in decimal format
small error; /60 needs to be /60/0,6 to get a correct “decimal time”

Calculate startingtime based on current charging time left againts “leave time”
This updates every minute, so it gets updated when the car reports longer or shorter charging times

If “now” > “starting time” then start charging

The A3 Start Laden flow checks for charging state, battery level, charging plug etc
The second logic condition makes it possible to set a time earlier than iNowEpoch which results in “tomorrow”
I disable flows 3 and 4 (and also some other flows, f.e. to stop charging when solar is low) to prevent things from running while car is forced to charge

If I change the Leavetime to 0 (outside 700-2200), this disables the previous flows or enables them

I reset the Leavetime to 0 when the car is fully charged, so when I need to leave, I only need to set the Leavetime to somewhere between 1-2359