home-assistant / frontend

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

"area" cards should NOT average power OR energy sensor values #20014

Open blakejalexander opened 4 months ago

blakejalexander commented 4 months ago

Checklist

Describe the issue you are experiencing

I created an area card for my living room, which contains a few temperature sensors, and smart plugs with power and energy monitoring. With it, I can see my room's temperature, power, and energy consumption at a quick glance.

Describe the behavior you expected

The temperature sensors display an averaged value (since I have them in a few spots in the room), the power sensors are summed, as are their energy sensors. Averaging the power of an area does not make sense and I would not expect to see it (by default) unless I specifically configured it. Likewise for energy. I would rather see that my living room is consuming 300W total and not the 25W average (actual values). After all, it is the total energy I am charged for.

Steps to reproduce the issue

  1. create a new area
  2. on the dashboard create a card for that area
  3. add multiple temperature, power, and energy sensors
  4. observe results

What version of Home Assistant Core has the issue?

2024.2.3

What was the last working version of Home Assistant Core?

No response

In which browser are you experiencing the issue with?

No response

Which operating system are you using to run this browser?

No response

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

ChristophCaina commented 3 months ago

same as #20374

ChristophCaina commented 2 months ago

Hi, this is just another case I noticed - and it is valid for sensors providing volume information

I have two sensors providing the fill-level of different oil tanks. Instead of creating the sum of both sensors, it is showing the average.

Even worse - I have also some sensors providing information about the usage-statistics (utility meters, etc.) In total - 7 sensors that are taken into account for the average.

grafik grafik

seevee commented 2 months ago

@ChristophCaina, @blakejalexander I have opened a PR at #20749 that should display the area power, energy, and volume sensors as a summation. Let me know if you get a chance to test these changes or if you have any additional thoughts.

ChristophCaina commented 2 months ago

Hi, I would love to test this - but honestly, I am not sure how to roll out the PR on my installation... :-(

blakejalexander commented 2 months ago

@ChristophCaina, @blakejalexander I have opened a PR at #20749 that should display the area power, energy, and volume sensors as a summation. Let me know if you get a chance to test these changes or if you have any additional thoughts.

@seevee unfortunately I'm also not really in a position to quickly test a PR with my current setup, and with my two weeks of holiday starting soon it'll take some time. If this is still open by the time I'm free, I'll see if I can give it a go.