Allow preference for sum instead of average for area card's sensor classes

Hi all,

Something that I’ve started to accomplish on my dashboards is creating camera views for each rooms that I want to display stats with using the area card. While piecing something together, I noticed that the values for a sensor class, eg: energy, is an average. I’d like to request some kind of implementation that allows for calculating the sum of all energy in a room.

For an example, I have a air conditioner that I have on an energy monitoring circuit that pulls approximately ~1100 watts in use, but there are 4 other smart outlets in the same room. This forcefully displays the sensor average of ~223 watts, rather than the full room’s usage.

I’ve spent a decent amount of time implementing work around solutions and got pretty close, with some issues.

  • I tried creating a sensor in my configuration.yaml which utilized templates to select specific entities, this worked, but I can only display classes.
  • I tried implementing my own python implementation to define my own sensor class, but did not have luck integrating it into the particular card.
  • I even tried to create a picture card and render a lot of elements on top as an overlay, with positional styling to replicate a camera_view, but this does not scale well across resolutions when you have multiple metrics displayed.

I’m admittedly pretty new to the Home Assistant ecosystem and starting to go crazy with anything, so there’s probably something I am missing or maybe this is a genuine request.

Trying to figure out what this is about. Are you talking about the area card?

Yes, my apologies, I looked at the code and ran with camera view. Updated post to reflect.

Ran into the same thing today.
Looks like someone is already working on this.

See “area” cards should NOT average power OR energy sensor values · Issue #20014 · home-assistant/frontend · GitHub as well as the PR to it: Add sensor summation to area card by seevee · Pull Request #20749 · home-assistant/frontend · GitHub