Ive reached the limits of my limited understanding how HA does its calculations in terms of consumers.
A day ago ive installed HAOS on a new rpi5 wanting to get a better overview on what my solar does.
I have Zigbee Wallplugs to measure my appliances power consumption. I know theres better solutions but thats what i had available. Each Plug is its own consumer.
My solars Deye somehow fucks up its reported total generated kWh, so i use an integral helper to get its actual production in kWh from the current produced W over time.
My return to grid is just current produced solar in W - all consumers current pull in W also fed into an into an integral helper to get kWh. I dont get paid for RTG so its honestly fine its this simple.
HA properly is able to calculate the consumed power and return to grid but for some reason adds the consumers to have pulled from grid as well and i dont know how the heck im supposed to make it realized that it doesnt need to take all consumption double. After all solar consumed with means all consumption measured was covered by the solar production.
Heres some info about my helpers:
combinedconsumption is just a SUM of all consumers current W pull which is then used in rtg
rtg is a template which is defined as follows:
{% if (states('sensor.solarman_total_ac_output_power_active')|float - states('sensor.cc')|float < 0) %}0
{% else %}{{states('sensor.solarman_total_ac_output_power_active')|float - states('sensor.cc')|float}}
{% endif %}
rtg_integral and true solar production is just to turn the reported W from rtg and my Deye into kWh.
Hope i provided all the info needed for someone to tell me where im being dumb. thanks for reading