frontend icon indicating copy to clipboard operation
frontend copied to clipboard

Energy dashboard: negative "Non-fossil energy consumed"

Open g1za opened this issue 2 years ago • 6 comments

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: Screenshot 2023-11-14 alle 17 57 21

Steps to reproduce the issue

  1. Manually charge the batteries from the grid at night (I assume any time there is no PV production)
  2. Check the energy dashboard "Non-fossil energy consumed" gauge during the day

Screenshot 2023-11-14 alle 07 35 51

Screenshot 2023-11-14 alle 14 25 17

Screenshot 2023-11-14 alle 17 55 31

Screenshot 2023-11-15 alle 00 10 48

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

g1za avatar Nov 14 '23 16:11 g1za

It really looks like HA takes the assumption battery charge can only happen when there is PV production.

Large Images

g1za avatar Dec 15 '23 01:12 g1za

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.

github-actions[bot] avatar Mar 14 '24 01:03 github-actions[bot]

Issue still persistent

g1za avatar Mar 14 '24 01:03 g1za

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.

image

In the above chart I wouldn't expect any negative values and would expect the red bars to be positive.

lfarrand avatar Mar 22 '24 15:03 lfarrand

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.

github-actions[bot] avatar Jun 20 '24 16:06 github-actions[bot]

The bug is still there

g1za avatar Jun 20 '24 16:06 g1za

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.

shanetuohy avatar Sep 03 '24 08:09 shanetuohy

I have the same issue, with my Growatt battery.

LizardWizardGB avatar Nov 12 '24 19:11 LizardWizardGB

Same issue

Image

AndyMillne avatar Jan 24 '25 07:01 AndyMillne

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.

linuxstony avatar Feb 27 '25 12:02 linuxstony

I have a same issue. Yesterday Image Today Image Image

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.

jamesloker avatar Mar 20 '25 09:03 jamesloker

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. image image image

jomach avatar Mar 27 '25 15:03 jomach

Hi @karwosts sorry to Ping you but I saw comment the last issue related. Do you know someone who can help here?

jomach avatar May 05 '25 21:05 jomach

We had a big update of energy calculations in 2025.5. Can someone try on that version and see how it looks?

karwosts avatar May 09 '25 00:05 karwosts

Hi, yesterday after the update my self sufficiency was zero - despite solar input - i am fairly sure that this is wrong.

Image

The last days (before the update) I didn't have negative values though.

linuxstony avatar May 09 '25 05:05 linuxstony

Same here. Energy – Home Assistant.pdf

jomach avatar May 09 '25 07:05 jomach

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?

karwosts avatar May 09 '25 13:05 karwosts

That's the problem for me, I will wait for 1 day. Just upgrade to 2025.5 to see if it helps.

jomach avatar May 09 '25 13:05 jomach

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?😕

karwosts avatar May 09 '25 15:05 karwosts

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:

image

image

jomach avatar May 10 '25 04:05 jomach

@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!

g1za avatar May 10 '25 05:05 g1za

@karwosts I will report a new ticket with the detailed explanation.

jomach avatar May 10 '25 05:05 jomach

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?

Image

karwosts avatar May 10 '25 12:05 karwosts

It is. But in my analysis that is an effect of the calculation of negative energy consumed when manually charging the batteries (at night).

g1za avatar May 10 '25 13:05 g1za

I don't charge at night and it is also wrong.

jomach avatar May 10 '25 13:05 jomach

I don't charge at night and it is also wrong.

jomach avatar May 10 '25 13:05 jomach

@jomach That’s why you should report in a different issue.

g1za avatar May 10 '25 16:05 g1za

@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.

karwosts avatar May 10 '25 18:05 karwosts

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

g1za avatar May 10 '25 18:05 g1za

I created an issue for the Self-sufficiency here https://github.com/home-assistant/frontend/issues/25446

jomach avatar May 12 '25 16:05 jomach