Hi guys, I saw this post and thought of your app. Would this usecase be possible in some way?
Maybe, combined with iCalCalendar** the [time to leave] variable can be set in a Google calendar appointment.
The calc [time to leave] minus [chargingtime left] is the challenge here.
( **) As far as I know, apart from Homey Alarms, thereās nowhere to input a varying timestamp/value?)
Iām a but surprised (not for Flow Utilities, I didnāt know about the app before @Peter_Kawa mentioned it) that this type of calculation is āsimplyā not possible, and that this has not been requested a lot in the past. Iām sure there are lots of usecases for this type of calc.
Anyway, it could also work with numbers, if I use/set a numeric var and set the time as ā1700ā calculation the starting time is easy, but then the challenge is to convert 1700 (leavetime) - 180 (chargingminutes) = 1400 (startingtime) to a timevalue that Homey can use. @RobbertVThat (calculating 1400 to a timevalue) is then the only problem I need to solve
The reason I want this is because I want my car to preferably charge on solar but I also want it to be full when I leave, so that it will be forced to charge to 100% at leave time.
edit: managed to fix my use case with Better Logic
Sorry, hadnāt have time to look into this. Quite busy atm.
But a quick think is to use Unix time format. So converting the current time and wished time to unix format, than compare this to the needed charge time (maybe with some extra converting to miliseconds).
Then add trigger.
But have to look deeper into this on how to create this in flow cards/variables without super specific or 10 cards for this.
I do have a question about the value that is coming from you car charge time. What format is this? Time like 1:30, minutes, seconds or miliseconds?
I thought about that, too, how i could be possible to add a trigger with an argument. The problem will be, that a comparing time is set in the trigger card as argument. Nomally this is a filter to trigger only if the filter check is true.
For the time trigger, you need an interval every minute. Then trigger a ātime changedā frlow trigger. Then check the argument in the handler. That will be very CPU cumsoming doing this every minute.
For parsing the time: Iām parsing a string in my MySQL app and reading a date offset. Then I add this offset to a date (day, month, year. I think that could be an option for you. So parsing a time string (split at : ) and add hours/minutes.
Hi guys,
With help and inspiration of @zakraket 's flows to calculate with numeric time, I found a way to convert numeric time to time and vice versa; So we can calculate with time stamps. Maybe it can be of any help.
(And @RonnyW , your code is impressive, but way out of my league )
The other used flows;
The usecase is a calculation of:
when to start charging a car,
depending of the remaining charge time (reported by the charger, in minutes),
and the departure time (user entered time).
Thanks for the suggestion! I will add this to our to-do list.
Maybe you could help me with the correct writing of the NOK currency, is it correct like this?: 10 kr
Yes, that is correct. But is your app actually converting? I tried to enter an number, but the oputput was without conversion. It just added GBP to the number. Did I miss something?
due to personal matter and holiday I didnāt get a change to have a proper look at this request.
To get to the point I donāt think it will be a good fit for the app flow utilities.
Itās a really specific use case and requires a lot of flow cards and dependencyās.
Next to that is something already mentioned to create a trigger function will be quite hefty on Homeyās performance and I donāt want to risk that.
Luckily in the mean time @zakraket already made a good example working. And with Advanced flows you can go even further with this now without requirement of new flow cards.
Is i possible to remove everything behind . when calculation time based on a start time?^
I use Duration to track the time my vaccum is using, and then I use calculate to devide the duration by 60 to get the correct minutes used. But i do not need to know that i took 28.457 minutes. Iām just interessted in the duration in whole minutes.
Thanks for the fast reply yesterday, your solution @RobbertV worked as I wanted.
Did not get the āCalculate {{round([duration]/60 ,0)}}ā to work, or understand how I could use it.