Using Home Assistant to calculate my energy bill using data from my Solar Inverter

Not at all. I had the same idea recently and implemented it and it works perfectly.

Here is where I documented it