[APP][Pro] Flow Utilities

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?)

1 Like

Thatā€™s an interesting case indeed. I will investigate a bit about this. Will get back on that.

3 Likes

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.
@RobbertV That (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.

Example: homey.mysql/device.js at 172faca7339dcdd50f21389fd7d6e80ff3e2693c Ā· RonnyWinkler/homey.mysql Ā· GitHub

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 :upside_down_face: )

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).

  • The remaining charging time has changed:

  • Departure time has changed:

1 Like

Hello! great app! Currency: Iā€™d like to convert into NOK (Norwegian). Any hope that more currencies could be added?

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

Keep an eye on this forum for the update.

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?

No the app doesnā€™t support actual converting, this is something you can do yourself with the calculation card.

De currency card is just to set the correct currency notation and symbol.

Hi and sorry for the late response.

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.

1 Like

well, just to claim some credits :wink: , it was my own working solution @Peter_Kawa posted here (he mentioned me in his post :slight_smile: )

My apologies, you are right! Maybe I need another holiday :sweat_smile:

Iā€™ve changed the text.

2 Likes

App update: (Test: 1.4.3 )

  • NEW Added currency formats for :norway: Norway, :sweden: Sweden & :denmark: Denmark

Thanks for the help @Kai_Engvik

1 Like

App update: (Test: 1.4.5 )

  • NEW Add support for :norway: Norwegian language
  • FIX Language locales for Norway, Sweden & Danmark

With special thanks for the help @Kai_Engvik :pray:

2 Likes

App update: (Live: 1.4.5)

    • NEW Added duration in seconds to global and trigger (flow) tags
    • NEW Added currency formats for :norway: Norway, :sweden: Sweden & :denmark: Denmark
    • NEW Add support for :norway: Norwegian language
    • FIX Language locales for Norway, Sweden & Denmark

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.

Calculate {{round([duration]/60 ,0)}}
This rounds to 0 digits.

2 Likes

Yes, that would be the solution indeed.

Alternatively you can use the covert card from flow utilities to do the same calculation. Then set decimals to 0.
image

4 Likes

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.