Repository navigation
[FR] Let an excluded device claim part of the solar forecast #341
Closed
syphernl
started this conversation in
Feature Ideas
Replies: 2 comments
|
Thanks for the suggestion! 🙌 Here's how this works:
If your idea is very specific to your setup, it may not make it into the core integration — I'll try to suggest a workaround in that case. Feel free to discuss details or alternatives below. |
0 replies
|
Implemented in v1.5.0. An excluded device can now point at a sensor with the energy it still expects to use today, optionally gated by a presence entity; predictive charging reserves that share of the remaining solar forecast and re-plans when it moves by 2 kWh or more. Configure both fields on the excluded device. Thanks @syphernl. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
[FR] Let an excluded device claim part of the solar forecast
My battery sat idle at 53% for three and a half hours today while the sun was out, and
Predictive Charging thinks that was the correct call. I think the model has a blind spot,
and I would like to know whether you agree before I go build a workaround.
Setup: one Marstek Venus E (5.12 kWh), EV charger configured as an excluded device
(
included_in_consumption: true,allow_solar_surplus: true,dynamic_power_control: true).evcc owns the wallbox.
What happened
weekly_full_charge_statuswaschargingthe whole time, so the battery wanted to get to100%. Meanwhile
binary_sensor.*_predictive_charging_active:There was no way for the battery to get anything out of the sun here. PV 4262 W, house
1737 W, car 10.4 kW, so 7.9 kW of grid import and zero export for Dynamic Power Control to
work with. Its phase was
monitoring_residual, which is correct, there just was no residual.Throttling the car does not fix it either. I checked: the car would have to drop below
2525 W before any export appears, and that is under the 3-phase minimum current. So grid
charging was the only option, and the deficit check said no.
Why I think the check is wrong
The exclusion gets applied to the present but not to the forecast.
Right now,
ExternalLoads.consumption_delta_kw()subtracts the charger from the homesensor, so the car correctly does not count as household consumption. Good. But
solar_remaining_effective_kwhis 17.36 kWh and all of it is treated as available to thebattery, while the car is on track to eat basically all of it.
There is already a comment at
pricing/engine.py:2422saying the full-day Home Energycounter "does not apply excluded/additional-load adjustments". That got solved on the
consumption side. The solar side never got the same treatment.
What is actually available to the battery is
stored + max(0, solar_remaining - EV demand).If the car takes 17.36 kWh or more, that is 3.99 kWh against 7.20 kWh of remaining household
consumption, so a 3.2 kWh deficit. The planner had already picked out slots for exactly that
(11:15-16:00, EUR 0.125-0.130, comfortably under my
max_price_thresholdof 0.25). It justnever decided it needed them.
What I would like
An optional entity per excluded device reporting expected remaining demand in kWh. evcc
hands that over directly as
chargeRemainingEnergy, and you can derive it from an ETA timescurrent power otherwise.
Only for devices with
included_in_consumption: true. On the other path the load alreadysits inside the consumption forecast and you would count it twice. If the entity goes
unavailable, behave exactly as today. And please put
excluded_demand_claim_kwhin thediagnostics attributes next to
solar_surplus_kwh, otherwise this is impossible to debug.No new pricing logic needed as far as I can tell. Once a deficit exists the slot selection
and
max_price_thresholdalready do the cost side.One thing that has to happen first
The engine evaluates once at 00:05, before any EV session exists. Without a re-evaluation
when an excluded device starts or stops drawing, a remaining-demand input changes nothing.
Same re-evaluation gap as the midnight stale-SoC thread.
Things I tried or ruled out
predictive_safety_margin_kwhlooked like the obvious knob, but it is capped at totalbattery capacity (5.12 kWh) and I would have needed roughly 13.5 kWh to force the issue
today. It cannot express this case at all.
Capping the car externally: cannot create export, see above.
Manual mode plus a charge setpoint: works, but it freezes all automatic control, so I would
need a timer and a fail-safe to make sure the battery is not still stuck tomorrow. I would
rather not.
Where this goes wrong
If the car finishes early or the sun overperforms, the battery will have bought energy it
did not strictly need. That is bounded by battery capacity and it only ever buys in the
cheapest selected slots, so I can live with it. Default off keeps today's behaviour intact
for everyone else.
All reactions