home-assistant / frontend

:lollipop: Frontend for Home Assistant
https://demo.home-assistant.io
Other
3.96k stars 2.68k forks source link

Energy Dashboard wrong visual representation #15845

Closed Phreak87 closed 1 year ago

Phreak87 commented 1 year ago

Checklist

Describe the issue you are experiencing

Hello,

the visual representation of the energy consumption looks wrong. I have 600W PV-Modules installed. while i have 600W full power i consume ~300W by myself an ~300W goes back to the Net (Pink). while i consume Energy i have some peaks (e.g. make a coffe - which takes 1500W) - this cannot be handled by 600W Max. Peak. The representation says (last 3 bars) that i have nothing consumed by the net (or better to say i have negative consumption ... blue once down). i would await to see a blue bar on the top of the orange ones which sum up only the positive values of consumption.

image

Describe the behavior you expected

i would await to see a blue bar on the top of the orange ones which sum up only the positive values of consumption.

Steps to reproduce the issue

  1. Negative energy consumption over 1 hour with positive consumtion within this time.

What version of Home Assistant Core has the issue?

Home Assistant 2023.3.5 Supervisor 2023.03.1 Operating System 9.5

What was the last working version of Home Assistant Core?

No response

In which browser are you experiencing the issue with?

Chrome 111.0.5563.65

Which operating system are you using to run this browser?

Windows 10 Pro

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

karwosts commented 1 year ago

It may help if you can show a screenshot of the energy dashboard configuration which lists which sensors are inputs to your energy dashboard (consumption, return to grid, solar production), and for each of those sensors, show a graph of their value over the relevant period you are concerned with where the graph is incorrect? Hard for me to really understand what is happening here.

Phreak87 commented 1 year ago

Hey!

sure - i will describe with more details:

First my configuration: Net usage is a Tasmota SML with Hichi IR-Sensor (5Sec). Balcony Power is OpenDTU (5 Sec interval).

Return Value is manual sensor summing up negative values from the net sensor. Screenshot_20230318-223337

for my example i use the timerange 13:00 up to 14:00: image

i have ONLY a positive value from PV (yellow bar) but the exact timerange has peaks the pv cannot handle (over 600W, so this must be a delivery from the net.): Screenshot_20230318-223222

i would expect something like the green marked one (but to be exact there should be two blue bars - one positive net upwards and one negative net downwards) image

hope this helps for better understanding. Feel free to ask if you need more details on this.

jove01 commented 1 year ago

I hope I can attribute a similar problem here. First, I'll describe it here: https://community.home-assistant.io/t/incorrect-value-as-consumed-from-the-network-in-energy-dashboard/549153

image

This problem has existed for some time.

karwosts commented 1 year ago

Isn't netzbezug energie supposed to be only the amount consumed, not the net? So should it never be below zero?

Consumption (the first sensor) is what flows into your house from the grid, Return to grid (the second sensor) is the amount that flows from your house to the grid. So I think both of these values should only ever be positive, and combining the two gives you the net.

(but to be exact there should be two blue bars - one positive net upwards and one negative net downwards)

Why would there be a blue bar downwards? Isn't "negative net" the amount returned to the grid (the purple bar?)

Phreak87 commented 1 year ago

Hey,

i think the amount of cunsumed energy can be below zero - because this exactly what also the powermeter gives as value - and better ... if you dont have a explicit "back to net" sensor you have also values.

Cosumption is what i give AND what i take from grid - its the only way to get the exact value of power to the grid because all 3 Phases are summed up as power in the powermeter ...

the blue downward is not neccessary - you right- but if you dont have the negative value summed up as "back to grid" sensor you have the possibility to get at least one amount:

the blue and purple bar are not always the same (i think the difference is the positive value that should be showed at the top of yellow) image

i think the "Power consumtion sensor" should be splitted upp internally in 2 values: first value should sum up only positive values and the second sum up only negative values.

karwosts commented 1 year ago

I see your point, but I don't think I can help you any further. As far as I understand, home assistant thinks consumption and return should always be >0. If your power meter doesn't work like that, then you need some kind of template shim in between to make it work as it is expected.

i think the "Power consumtion sensor" should be splitted upp internally in 2 values: first value should sum up only positive values and the second sum up only negative values.

This is probably more appropriate for a feature request/discussion, since as best I can tell here everything here is working as intended, unless I'm missing some nuances of three-phase-power. But that's just my personal opinion, you can wait and see if you get some other feedback.

Phreak87 commented 1 year ago

Thanks for yor explanation and your work on this. Should be a simple one to split the consumption a second time (as already done with house to grid on negative values). The second would be then only the positive once. Then use this sensor in dashboard and this should fix the issue.

jove01 commented 1 year ago

I think there is a misunderstanding here due to the HA internal translation. In english "net consumed" means in German "Nettoverbrauch" The German HA-Version writes "Aus dem Netz verbraucht", not "Netto-Netzverbrauch".

Phreak87 commented 1 year ago

I think there should be more configuration options for the dashboard to specify more detailed what a sensor is delivering (negative/positive values). This Would make it more clear what you need to give and what your Result is looking like - (Thing about automatic background riemann integral and pos/neg value switches). Would be more a feature request ...