My Dynamic Energy Storing System (battery storage) produces battery_history _dischargedenergy and battery_history_chargedenery. From my Tibber Pulse I read the Electricity price. These values I am able to put into graphs. The Tibber dynamic electricity price changes every hour. I want to calculate the hourly cost and earnings of this battery system.
Basically I need to calculate the charge or discharge every hour and multiply by the hourly electricity rate. Since I’m a novice in programming Home Assistant I could use help.
I tried to create a helper to calculate. Since everything is time related I lack knowledge to program that. Any tips how to do this?