How much solar power I consume

Hello,
I am looking for a solution to the following problem:

How do I find out how much electricity I use myself from my PV system? The PV system is integrated in the HA. So is my electricity meter. it does not give me the value that I have fed in.

What does it give you?

Helps me decide whether to buy a battery. However, I have now understood that I cannot achieve my goal with the data I have.

No. I was asking what sensors you do have. You only told us what you don’t have. That’s not much use in determining if you can derive the values you need using template sensors.

So I’ll ask agin.

What sensors do you have?