WTH does Energy Dashboard not support nesting energy sensors?

I just started using energy metering about a month ago and it has been amazingly useful. This is one issue that I think could be solved fairly easily.

Description:

I have CT clamps measuring many circuits in my home, including the entire garage. In the garage I have a car charger that provides energy metering. With this setup, electricity consumption when I charge my car is counted by both sensors. I would like HA to track both, but it needs to understand that the car charger is a sub-meter to the overall garage circuit meter. Currently, it simply double counts this consumption and calculates a negative ā€œUntracked consumptionā€.

Proposed solution:

The energy configuration of individual devices needs to have the notion of ā€œupstreamā€, or ā€œparentā€ device, so they can exist in a hierarchy. Then HA could properly calculate Untracked consumption by excluding downstream/child devices. In the individual device total usage bar graphs, the downstream devices should be included together within its upstream device.

Why not make a template entity that just subtracts the other consumption of the car from the garage?

@martinhill I added a vote for yaā€™ because I think the intent of what youā€™re after is spot on. Emporia does this nesting very well with their native app. For HA to do energy properly, a feature like this is fundamental and would be much better than template sensors everywhere. Thatā€™s what I currently have and it ends up compounding the already horrible issues for energy sensors which may or may not zeroize at midnight every day.

Maybe consider changing the title to ā€œWTH does HA not support nesting energy sensorsā€ or similar?

2 Likes

Yes, that would be very nice feature - of course you can do that with templates as a workaround and it might be fine for 1 device but what if you have more of them then it just becomes difficult to manage

The way we can design the sensor to be used in the Energy Dashboard could be enhanced and probably more user friendly.
I am not very advanced in HA, not a newbie either but I could not figure out how to build proper calculated sensor using template.
I keep having negative values which is impossible theoritically.

ā€¦ because itā€™s ineficcient in many way.

  • might be a huge task for maintainer, depending on growing number of power devices
  • contributes to system load
  • such substracting sensors are just template sensors which cannot be linked with devicesā€¦

Let me paraphrase your question: why just not make it easier and strightforward?
Why you suggesting workarounds on WTH problem?

I already have a few substracting sensors (for different reasons) so I know how confusing it can be sometimes.

I agree with OP. It would be very usefulll to put on dashboard any power measurement sensor while only the most parent ones will be taken for overal calculation.

I guess it was not a problem before untracked consumption was added.

2 Likes

I offer work arounds because many WTHs will not be acted on. This current functionality is in the frontend, I donā€™t see how the info can be published back to the backed to generate an entity. It would likely need to come from a user managed integration like utility meter or something new. I.e. no different than making a template entity in a way.

This gets untenable in large energy monitoring P.

Ive tried. And stopped trying itā€™s too hard.

Ive got about 50 circuits I the home in a complex distribution system. Iā€™ve got sensors to measured at various levels. Iā€™ve got incoming service all the breakers all the lugs and one breaker box is even fed by the other and nests at that level. So I start with most of my loads at least one maybe two levels of nesting down. Unless I cherry pick my sensors my energy dashboard is trash because it wants to double and triple and sometimes Iā€™m even getting quadruple counts.

I can accommodate it nicely with something like a Sankey chart (see above and thatā€™s what a space heater does to electricity consumption btw) but the base energy dashboard is only good for top level rollups right now because I have to omit a lot or build a ton of templates by hand

Id TOTALLY support rollups.

And yes it was the untracked feature that did it.

3 Likes

Iā€™m not against this WTH, I just donā€™t see how it could be implemented with the current system for the energy panel. Thatā€™s the only reason Iā€™m offering the work around as a method to get the desired result.

1 Like

Oh i get you. And agree. Iā€™m for creating templates when necessary but no Iā€™m not buildingā€¦ Last count was 55 templates to do that. I chose to display only the rollups and use the sankey for detail.

Unfortunately it means the energy panel needs a complete rework to handle complex deployment. And that rework needs some method that can define nesting. (prob a parent/child attribute in a monitored entiity that if existsā€¦ Etc.)

1 Like

Exactly! Between @NicoLeOcaā€™s issue with negative energy sensor values (most likely means they need to screw with the energy sensorsā€™ state_class and/or create utility meters to use in their place*) and this WTH where HA needs a mechanism to understand the hierarchy of these circuits, creating a usable picture of energy usage can be very cumbersome. Plus, some users may be ok with a simple circuit presentation, but Iā€™d rather view my energy in a logical waterfall.

Energy Sources > Energy Source Categories > Grid/Mains > Areas > Floors > Rooms > Devices

A daunting programming task to capture all of these issues and present an approachable UX for sure, but I think thatā€™s what is really needed to make the energy dashboard truly useful.

*This whole situation should probably be a WTH too. As inā€¦WTH canā€™t HA filter out large energy sensor spikes at midnight every day?

Same mindset, different target
I was trying to view my energy usage by device type.
Entertainment; Cooking; Heating System, Lighting; specific appliancesā€¦

3 Likes

I could think of making use of labels for the energy dashboardā€¦

1 Like