Amortization of my balcony power plant

Good day everyone!

I would like to calculate and display the amortization of my balcony power plant in Home Assistant. However, I do not know how to proceed. Perhaps you have ideas how I can implement the whole thing. I currently have the following data:

Current production of the balcony power plant [W].
Total production of the balcony power plant [Wh].
Current consumption by Tasmota IR reading head [W] incl. the feed-in of the balcony power plant
Actual meter reading by Tasmota IR reader [kWh to 7 decimal places].

Simply multiplying the total production of the balcony power plant with the current electricity price is not correct, because the overproduction is given away (admittedly this is not much for such a plant). So I would have to get only the kwh, which is also used by myself and then multiply this with the electricity price. Does anyone have an idea how I can implement the whole thing? I am kind of on the tube.

Thanks in advance

I don’t have an answer in place rather have a question for you :slight_smile:

Assuming that you are reading the production value of balcony system without net metering, how can you be sure that you are consuming all produced electricity? It could be fed into grid system, when current consumption of your home is lower than what you are producing and you are giving it (probably) free to grid. Or do you have metering system?