evcc icon indicating copy to clipboard operation
evcc copied to clipboard

Refactor target charging apis

Open andig opened this issue 1 year ago • 14 comments

This PR moves all target charging apis to separate end points:

  • /target/time/<time>
  • /target/soc/<%>
  • /target/energy/<kWh>

As we are now actually returning the current plan, we'll also be able to cache and reuse it in case that proves useful for performance or planning stability.

TODO

  • [x] ~~decide how to make planning conservative again~~ rebase on master
  • [x] update apis in ui
  • [x] enable energy based target charging in ui
  • [x] add tariff api (/tariff/grid|feedin|planner) where planner maybe dedicated planner tariff (co2) or grid tariff
  • [x] add plan api
  • [x] simple text-based plan summary (visualisation next)
  • [x] proper translation
  • [x] ~~unplausible plan data for fixed grid prices~~
  • [x] document ui-pushed variables
  • [x] update api docs
  • [x] fix https://github.com/evcc-io/evcc/issues/5784
  • [x] fix start/end not shown when plan end beyond tariffs
  • [x] always include costs even when all remaining time must be used
  • [x] fix plan not updated when opening dialog @naltatis
  • [x] fix plan updated on ui reload even if target time is inactive @naltatis
  • [x] add target charging by energy instead of soc @naltatis

/cc @schenlap an der Funktionalität hat sich noch nichts geändert, bis auf die Tatsache dass die Effizienz nur noch 1x aufgeschlagen wird und auch das wäre unter dem erstem Punk zu bewerten.

andig avatar Jan 02 '23 09:01 andig