Cascading energy consumption - is it configurable?

Hi,

I have main energy measurment unit mounted on grid cable.
Then, i measure current for some of the wall plug, but I also have rooms where the measurement is taken behind the meter for the entire room and there the additional device also has its own meter.
It’s look tike this:
Main meter → room meter → wall plug

If I add a “room meter” to the dashboard for measuring current, the results will be incorrect because the devices in this room are not included as part of it.

I would have to use it as the main energy meter, but not all rooms are measured like that, so then the “room meter” counter will be added to the “main meter” and should be subtracted.

Is there a way to bypass this? Building cascade metering in HA?

hello,

you need to setup a template like:

template:
  - sensor:
      - name: "power_net"
        unique_id: some_unique_id
        unit_of_measurement: "W"
        device_class: power
        state_class: measurement
        state: "{{ states('sensor.total_power')|float - states('sensor.room_power')|float }}"
#add more sensor if you need

        availability: "{{ has_value('sensor.total_power') and has_value('sensor.room_power') }}"
#add availability according to sensors

Look at documentation:

Post about same thing: Chained Power Usage - #3 by tom_l where tom_I suggested the template.

of course you can do a more sensor subtraction by adding more sensor using the same template.

You can vote for Energy dashboard - Nesting (multilevel) of Individual devices - Feature Requests - Home Assistant Community :wink:

Sankey chart!