#Consumers are always considered from grid and added on top of solar consumed

1 messages · Page 1 of 1 (latest)

floral apex
#

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

#

better screenshot to show that the grid consumption shouldnt really be there at all imho

wispy obsidian
#

Are you adding devices as grid sensors?

floral apex
#

is that wrong, i dont have a clamp or anything like that,. wait should i add the plugs in the individual device section?

wispy obsidian
#

Well, you can add devices as grid sensors. But not grid sensors and devices simultaneously, that's counting double

floral apex
#

nono i only listed them once

#

it should be the first screenshot in the post

wispy obsidian
#

What is AC summation?

floral apex
#

its the total kwh that went through the plug in its lifetime

wispy obsidian
#

Also you say: "my return to grid is just current produced solar" that can't be right

wispy obsidian
floral apex
#

its current W produced by solar minus the combined reported W reported by all consumers

floral apex
#

it has its own plug

wispy obsidian
#

Ok good

floral apex
#

All consumers are just these plugs reporting their entities via zigbee

#

and all looks correct when i look at the values they report, it must be something ive set up wrong in HA since on the graph the solar consumed + rtg = the reported solar produced in the lower graph

wispy obsidian
#

I don't see anything wrong

floral apex
#

total consumed in the screenshot above should not be 0.47

#

aynthignt he solar covers shouldnt be listed as consuming power from the grid which it does because i can see it in the total grid consumed, it throws off the calculation for how much i spend

#

as i understand it the white bars shouldnt be there between 7am and 3pm

wispy obsidian
#

It's not consumed power from the grid. It's consumed solar power

#

Oh you mean that the devices are the consumed solar power?

floral apex
#

yes

#

they are the consumed solar power but somehow also added on top

#

thats why the total consumed is always double from what it should be

#

from 7am to 3pm since in that timeframe i produced more solar than i had total consumption

#

the last 2 hours are even more illustrative i guess

keen storm
#

Nothing that consumes solar power can be in "Grid consumption" section

#

That section is literally what is being imported from the grid.

floral apex
#

okay so the plugs should be in the 'individual devices' section?

#

i guess i can make a helper for actual grid pull that is "if combinedconsumption - solar" as long as its above 0

#

im just so confused since it does calculate solar consumed correctly

#

did set things up that way now

#

ill make this as resolved if the results make sense tomorrow

#

rpg_integral is just an integral of realgrid pull and realgridpull is defined as follows: {% if (states('sensor.cc')|float - states('sensor.solarman_total_ac_output_power_active')|float < 0) %}0 {% else %}{{states('sensor.cc')|float - states('sensor.solarman_total_ac_output_power_active')|float}} {% endif %}