How to properly configure the Energy Dashboard when measuring a section of the house separately?

How should devices be added in the Grid consumption and Grid power sections when we have overlapping measurements?

A sensors provides whole house measurement, and another sensor provides a measurement of a subsection of the house.

I’ve browsed far and wide without finding an answer, or maybe I searched for the wrong keywords.


I have a Shelly EM 50 with two clamps, one clamp measure the whole home energy/power consumption directly from the utility meter. The other clamp measures the basement branch from an intermediate junction box. Here you can see the setup details.

Using the template sensor, I worked my way around creating a fake Energy and Power sensor based on apartment = total - garage branch.

{{ states('sensor.shellyproem50_08f9e0e5c2e8_energy_meter_0_energy') | float(0)
   - states('sensor.shellyproem50_08f9e0e5c2e8_energy_meter_1_energy') | float(0) }}
{{ states('sensor.shellyproem50_08f9e0e5c2e8_energy_meter_0_power') | float(0)
   - states('sensor.shellyproem50_08f9e0e5c2e8_energy_meter_1_power') | float(0) }}

Here is the current configuration but I am not sure that this way I am measuring twice

For anyone stumbling upon here my configuration was wrong.

The Grid consumption and Grid power should have more than one sensor only if loads are measured more downstream than the utility meter.

Furthermore, to plot branches of from different junciton boxes it is enough to register them as “Individual devices”, of course they don’t measure a device in the real meaning of the word because they measure a whole section of the house but it gets the job done in the sankey diagram.