Energy Dashboard Monitoring Individual Devices

I have an Emporia Vue home energy monitor that monitors 16 branch circuits in my home. I’ve added most of these to my energy dashboard under the monitor individual devices section. I’ve also got some individual outlets that report kWh and I’ve added some of those to the individual devices section.

My issue is that the individual outlets that are being reported are also included in the reporting for the branch circuits. I’m struggling to come up with a method to create a new sensor that would take the branch circuit value and subtract the individual outlet value to come up with a net number to report as a separate bar on the chart. To clarify, I have “Bar A” and “Bar B” on the chart. The value for “Bar A” also includes the consumption reported in “Bar B” and I’d like to come up with “Bar C” which is “Bar A” minus “Bar B”.

The sensor for “Bar A” is a daily value and has a state class “total” whereas the sensor for “Bar B” has state classes “total” and “total_increasing” available. Both sensors report in kWh.

Any suggestions on how to accomplish this?

Can this realize your idea? First use utility_meter to count the daily value of “Bar B” and then subtract the daily value of “Bar B” from the daily value of “Bar A”. The specific implementation code is as follows:

sensor:
  - platform: template
    sensors:
      bar_c:
        friendly_name: "Bar C"
        value_template: "{{ states('sensor.bar_a') | float - states('sensor.bar_b_daily') | float }}"
        unit_of_measurement: "kWh"
        device_class: energy
utility_meter:
  bar_b_daily:
    source: sensor.bar_b
    cycle: daily

Thanks for the suggestion. I put that into place but it’s not working quite right. The value for Bar C is being calculated properly but on the Energy chart the bar is showing a much higher value. The bar is showing 6.54 kWh for the daily value but when you click on the bar the window that pops up shows a value of 1.03 kWh which is what the calculation would come up with. Bar A has a value of 2.44 kWh and Bar B has a value of 1.41 kWh and both of these show properly on the chart.

I’m puzzled why Bar C has a value of 1.03 but the chart shows it as 6.54.

The calculated value of bar_b_daily on the first day will be all the previous values. You can wait a day to see if it is normal.