How to NOT include energy of one sensor in energy of master circuit breaker?

Hello.
I plan to have energy meter in master circuit breaker that feeds electricity to whole house. Then I want to have some meters inside for particular devices (A/C, washer, projector). Now if I add all devices to energy configuration, the energy from individual devices will be duplicated, because they will already be included in energy of master circuit breaker (because they are connected in serial).

How to substract (or not report) energy from individual sensors that are connected behind master energy meter from that energy meter, or how to report master total energy and energy of individual sensors so they are not duplicated?

Thanks very much

Use a template sensor that uses the energy from the master circuit breaker and substracts the energy from individual sensors. something like:

corrected_energy:
      value_template: >
        {% if states.circuitbreaker_power.state %}
           {{ states("circuitbreaker_power") | float(0) - states("individual_power") | float(0) }}
        {% endif %}