Dynamic energy prices + home battery + solar panels

I would like to delve into the world of dynamic energy contracts and was hoping someone could help me with this. Let me sketch the situation: I live in Flanders and currently have solar panels connected to a 10kW hybrid inverter. There are also two EVs that are charged as much as possible when there is a surplus of solar energy. To make the charging of the EVs as cost-effective as possible, I have integrated the inverter, grid export and import, and the EV wallboxes into Home Assistant so everything can communicate with each other, resulting in 75% of the charging annually powered by solar energy.
Heating and hot water are provided by a heat pump. At the moment, I have a variable energy contract (monthly energy prices). Some figures: annual electricity import (including the EVs) is 6000kWh, and surplus solar energy export is 5000kWh.

To better utilize the 5000kWh surplus, I was considering adding a battery (9.2kWh or more) to the inverter. However, when I do the calculations, taking into account my consumption profile, the purchase and installation cost of the battery, the battery capacity, battery degradation, charge range between 10% and 90%, current electricity prices, and the winter effect (meaning the battery is most cost-effective for 8 out of 12 months), I arrive at a payback period of +15 years, while the battery’s maximum lifespan is 15 years at best. This means it is not cost-effective. So, either the cost of the battery needs to drop significantly, or energy prices need to rise drastically for it to become worthwhile.

This raises the question of whether it might be more interesting to switch to a dynamic contract with hourly prices, to charge the EVs and/or the home battery during low-price periods and limit the solar panel production to 0W export.

If anyone is in a similar situation and could share their experiences, that would be greatly appreciated.

I am in a pretty similar situation (solar, EV, no battery) and I have a dynamic contract for over a year.
The dynamic contract has been beneficial every single month, my guess is even >350 days per year.
For your own usage profile, you can check VREG’s V-test.

Exporting under a dynamic contract at the right time can be beneficial compared to a more fixed rate but on midday during summer, it might indeed be better to curtail. I run a simple automation based on injection rates (negative or not).

I believe your goal is to limit grid consumption and peak usage. Use your wallboxes optimally by matching charge rate to solar output in summer and charge when prices are low in winter (you could even calculate a weighted average of solar input and grid input).

Depending on your consumption profile a plug in battery might make sense as an investment. You can run a battery simulator to get a flavour.

Thank you for the info.
I did the VREG test and it’s possible to reduce somewhat the total cost for a year but not enough to justify the installation cost for a battery in my case.
But I’m curious to know more about your automation and where you get the injection rates from. If you would be willing to share your automation, that would be great and very helpful for me to better understand.
What I really want to know is how and when you decide to export.
In the meantime I installed the ENTSO-e Transparency Platform integration to fetch the current energy prices just to get some insight.

edit: I just noticed you’re very much involved in the ENTSO integration, so I guess that’s where you get your rates from.

Indeed, I use ENTSO-E for day-ahead prices, but you could also use Nordpool. Nordpool tends to publish a bit faster and has in the past been more reliable.

Your electricity provider will typically apply a formula to these wholesale prices, which I recommend that you apply as well, as it might trigger a negative injection rate even when the wholesale price is slightly above zero.
As a side note, you can also calculate the consumption rate. This requires a bit more components, such as grid costs, levies, VAT etc.

I use a combination of automations to control the export of electricity back to the grid. I’ll try to explain the logic and what might be specific to my use case:

  • Limit inverter output: this one is triggered based on the netto grid power. If grid power is below (-0.1 kW in my case) or above a threshold (0.1 kW) for a certain time (e.g. 1 minute), it will adjust the inverter output. To know what to set it to, I add current grid power and the current inverter power and this is the new target. I have a SolarEdge inverter which requires setting the target as a percentage of total nominal capacity so you have to calculate this (as you have a 10 kW inverter, this means you round to the next 100 W).
    Additionally, I have a condition that checks whether the injection rate is negative (which is probably redundant because of the other automations) and some extra edge cases to make use of negative consumption rates (which happened a few hours in 2025, but seems to be a thing of the past).
  • Enable the ‘Limit invertor output’ automation: when the injection rate changes (basically every 15 minutes), check whether it is negative. If it is, enable the ‘Limit inverter output’ automation and trigger it (because you might already be exporting). If it is not negative, disable the automation and set inverter output to maximum.
  • Enable the automation to check the injection rate: enable+trigger the previous automation on sunrise and disable it on sunset (and set inverter output to maximum). This is not really required, but avoids changing the output if injection rate are negative at night.

One unresolved issue is how to know how much I’m curtailing. Since this setup constantly limits the export and SolarEdge does not tell you how much it could be producing, I haven’t found a way of knowing whether it might be worth to start charging an EV.
You could probably periodically set the inverter output to maximum, decide whether it’s worth charging and go back to curtailing.

Hope this clarifies a few things, let me know if something is unclear.

1 Like

ok great, very useful info!
I also have a Solaredge inverter and was already looking into the same problem as you, the inverter doesn’t have a sensor for the potential generated power when limiting the export to the grid. One way to achieve this is by using the Solaredge status sensor: when it states “throttled” = there is probably more solar power available, then adjust the export limit? But just for fun I developed a PCB to measure independently the solar power using a mini solar panel. the PCB is powered by a second mini panel and LiPo which is also charged by the second mini panel. All measurements are collected and send to HA using a ESP32 module. Yet to test long term tho.

I just checked that sensor in SolarEdge modbus: 4 means full production, 5 means curtailed.
When I set output to 50%, sensor stays at 4 (it’s only producing at 10% of nominal capacity now). When I set output to 5%, sensor turns to 5.

I also use the Solcast integration to get a solar forecast. This is not very accurate, but might give an idea of how big the gap could be.

that is correct, these are the different states:
1: “Off”
2: “Sleeping (Auto-Shutdown)”
3: “Grid Monitoring”
4: “Production”
5: “Production (Curtailed)”
6: “Shutting Down”
7: “Fault”
8: “Maintenance”