jonasbkarlsson / ev_smart_charging

Electric vehicle smart charging for Home Assistant.
MIT License
139 stars 19 forks source link

Use `input_datetime` for completion time #226

Open hmmbob opened 7 months ago

hmmbob commented 7 months ago

Is your feature request related to a problem? Please describe. The current implementation with select.ev_smart_charging_charge_completion_time does not allow me to set i.e. "14:00 tomorrow" if the current time is still before "14:00 today".

Describe the solution you'd like I'd very much like to set a date/time combination, so you could (for example) set it to complete by "monday 07:00" on Friday and let the integration figure out what to do (knowing that chances are it'll charge on Saturday already)

Describe alternatives you've considered Not really sure if there is an alternative?

Additional context n/a

jonasbkarlsson commented 7 months ago

Thanks for the suggestion. However, your example to set it to complete by "monday 07:00" already on Friday will be difficult to implement. On Friday, there are no price information available for Sunday and Monday.

Would it make sense if "monday 07:00" would mean: 1) Don't schedule charging until Sunday 14:00. 2) At Sunday 14:00, schedule charging to be ready by Monday 07:00 3) After Monday 07:00, go back to step 1).

Is this really what you want? Or would you prefer that step 3) is "don't schedule any more"?

hmmbob commented 7 months ago

That's actually a fair point. I'm not sure how I envisioned this 😉 This request (or example) makes little sense, as most lowest prices in our (NL) weekends happen Saturday mid-afternoon, in the middle of the night between Sat-Sun, and/or Sun mid-afternoon (the afternoons especially when solar kicks in). The current weekend is an (expensive) exception for some reason.

Maybe the example in the request isn't valid - the issue I have most is this:

The current implementation with select.ev_smart_charging_charge_completion_time does not allow me to set i.e. "14:00 tomorrow" if the current time is still before "14:00 today".

So if I return at noon today and need the car by 14.00 tomorrow, I can't currently use 14:00 as a setting because it'll start charging right away.

ianmurrays commented 2 months ago

I have a similar request. It would be nice to be able to set a one-off completion time. For example, on Friday i would prefer if the car didn't finish charging by 7 am, since Saturday's electricity prices are already known when I get home, and they're much cheaper during Saturday noon.

So being able to set a "finish charging by 16.00 tomorrow" would at least work pretty good for my needs. It would then ideally reset to my regular "7 am" finish time.

Edit: just realized this can be achieved with automations 😅