I got this feed provided from Tibber, my power consumption accumulated for the last hour. I also have the price for the power. The price is without all the taxes so i added them and i then recieve the price as well. The price is updated pr 60 seconds, and the accumulated power consumption is updated every 1.5 second. My goal is to calculate the cost for every hour, and sum them as the hours pass. Example the first hour from midnight to 01.00 I have been using 3kWh, and the price was 0.50 Nok, calculated it will be 1.50, if that repeats itself the next hour then I am interesting in 1.50 NOK +1.50 NOK
Most of this is ok to do, my main problem is how to trigger the accumulated consumption every minute for one specific hour. Hope you understand my question.
Best regards Freddy.