Energy Dashboard Power Calculation

I have a couple of shelly pro 3 e.m. devices which are monitoring the power consumption of my house.

Is it possible to do a calculation of the devices which monitors total power consumption minus each individuel device and show the difference on the energy dashboard?

It shoud look like this:

1 Total power consumation (from shelly) 20 KW
2 Heating power consumation (from shelly) 5 KW
3 Oven power consumation (from shelly) 7 KW
4 Calculated varius devices power consumation (Total-Heating-Oven) 8 KW

1,2,and 3 I allready have, but how I do the calculation for nr. 4 and show it?

Many thanks
Chris

Use a template sensor to calculate it.

# configuration.yaml

template:
  - sensor:
      - name: "Other Devices Power"
        device_class: power
        state_class: measurement
        unit_of_measurement: kW
        state: >
          {{ states('sensor.total_power')|float -
             states('sensor.heating_power')|float -
             states('sensor.oven_power')|float }}
        availability: >
          {{ has_value('sensor.total_power') and
             has_value('sensor.heating_power') and
             has_value('sensor.oven_power') }}

If this is the first time you have used the template integration you will need to restart Home Assistant. You can then put the sensor sensor.other_devices_power in your dashboard.

The energy dashboard does not show power though.

This is a power sensor, not an energy sensor. Two different things.

With a bit of adjustment to the classes and unit you can make a the same thing for energy if you have the energy sensors available (measured in kWh not kW).

Or you can feed this template sensor to the integral helper to calculate energy.