Energy dashboard: negative "Non-fossil energy consumed"
Checklist
- [X] I have updated to the latest available Home Assistant version.
- [X] I have cleared the cache of my browser.
- [X] I have tried a different browser to see if it is related to my browser.
Describe the issue you are experiencing
When the next day PV produciton is not enough to cover my needs I charge my battery pack at night, when the cost is the lowest, to cover the future energy needs. I noticed that the gauge shows negative percentages when this is done; maybe the dashboard assumes the battery is charged only when there is PV production? The percentage progressively goes back to something more reasonable as the day progresses.
Describe the behavior you expected
I would expect that the energy used to charge the battery is not accounted when there is no PV production as (negative) "Non-fossil energy". It should just be zero.
Correct behaviour on a normal day with no battery charge at night:
Steps to reproduce the issue
- Manually charge the batteries from the grid at night (I assume any time there is no PV production)
- Check the energy dashboard "Non-fossil energy consumed" gauge during the day
What version of Home Assistant Core has the issue?
2023.11.2
What was the last working version of Home Assistant Core?
No response
In which browser are you experiencing the issue with?
Tested with Firefox 119.0.1 and mobile companion app. Not a browser issue.
Which operating system are you using to run this browser?
macOS Ventura 13.6.1 and iOS 7.1. Not an OS issue
State of relevant entities
No response
Problem-relevant frontend configuration
No response
Javascript errors shown in your browser console/inspector
No response
Additional information
No response
It really looks like HA takes the assumption battery charge can only happen when there is PV production.
Large Images
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.
Issue still persistent
This issue is also affecting me.
I charge my batteries overnight at a cheaper rate and then discharge later in the day. I'd expect the following graph to show that the battery charging has consumed power, not produced it. At the moment it looks like the batteries are providing negative usage.
In the above chart I wouldn't expect any negative values and would expect the red bars to be positive.
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.
The bug is still there
I've noticed this issue also and I believe it makes the energy dashboard less useful for those with batteries.
I believe g1za is correct that the energy dashboard assumes that your batteries only charge from solar energy. This is not true for many setups, and lots of people avail of cheap energy at off peak times to charge their batteries.
I have the same issue, with my Growatt battery.
Same issue
Would be nice if the devs could assign someone :) I am a subscriber and this value is wrong for me as well with a Zendure Hyper2000 and battery. Please correct the algorithm.
Thanks in advance.
I have a same issue.
Yesterday
Today
I noticed it started happening when i created a helper utility meter to replace the Enphase Envoy daily production entity. The enphase was showing a spike every morning at between midnight and 1am which caused the solar readings to be incorrect as per https://community.home-assistant.io/t/enphase-envoy-integration-showing-incorrect-daily-production/688033/2
Since then it shows the negative self sufficiency.
Same issue . In my case I think it is because my battery is only one phase. This means when I charge or discharge it only works on one phase and my metering device resets it's against the other phases.
Hi @karwosts sorry to Ping you but I saw comment the last issue related. Do you know someone who can help here?
We had a big update of energy calculations in 2025.5. Can someone try on that version and see how it looks?
Hi, yesterday after the update my self sufficiency was zero - despite solar input - i am fairly sure that this is wrong.
The last days (before the update) I didn't have negative values though.
Same here. Energy – Home Assistant.pdf
Hi, yesterday after the update my self sufficiency was zero - despite solar input - i am fairly sure that this is wrong.
The self-sufficiency equation roughly says:
1 - (energyFromGrid / homeConsumption)
If your energy from grid is greater than your total consumption, then that's why that would be zero (as it's clamped to not go below 0).
If your consumption was 10kW and you achieved that with 5kW of input, that would score 50%. If you consumed 10kW with zero grid input, that would be 100%.
I'm not exactly sure what number you would like to see in this case.
Same here.
@jomach this pdf simply doesn't sense to me. It says you have 11.63 of energy inputs (solar/grid_in/battery_out), and from that you managed to export/store 13.1 kWh (to_grid and to_battery). That doesn't add up?
That's the problem for me, I will wait for 1 day. Just upgrade to 2025.5 to see if it helps.
Just to note nothing changed in 2025.5 on the collection side, so looking at any of your history from previous days would be equally valid, they'll all be showing the new computations.
Also why are we all discussing self sufficiency if this thread is titled about non-fossil energy gauge. Was that always just a typo?😕
So I just checked the data against my Victron UI and there is definitely something wrong. I think the main problem is that my battery is only one phase instead of three phases. My energy meter compensates the different basically. This is normal in Germany. Victron data:
@karwosts no, that was not a typo. The problem I reported here is about negative non-fossil energy, as well documented. Everything about self consumption should be moved to another thread and maybe marked as spam in the current context. About the bug I reported I need to manually charge my batteries at night, which may be tricky as during summer time they are already fully charge during the day. I let you know. Cheers!
@karwosts I will report a new ticket with the detailed explanation.
The problem I reported here is about negative non-fossil energy, as well documented.
But this is what you highlighted in your original post? That is self-sufficiency gauge?
It is. But in my analysis that is an effect of the calculation of negative energy consumed when manually charging the batteries (at night).
I don't charge at night and it is also wrong.
I don't charge at night and it is also wrong.
@jomach That’s why you should report in a different issue.
@g1za - please update to 2025.5 and provide a new analysis if you still have an issue. I'm still not entirely sure I understand what point you're trying to make, but I believe support for charging batteries from grid and discharging batteries to grid should be greater supported now.
Thanks @karwosts I’m saying that charging batteries from grid is (or was) not supported (I believe the system assumed batteries could just be charged via solar panels and not grid, hence negative values). What I see is being reported is negative values, no matter what, that is not the original issue I reported
You’re right, I made a bit of confusion in my previous post, but let’s keep in mind I reported this over 1,5 years ago… sorry about that 😅 At the moment I also have a problem with my internet provider and using his modem, so my local network is temporarily broken. I will test this as soon as possible and let you know. But probably not before two weeks also because of some business trips.
Cheers
I created an issue for the Self-sufficiency here https://github.com/home-assistant/frontend/issues/25446