During the past week I have been adjusting two sensors which resulted in two days with extreme costs (10 000 SEK/day instead of 100 SEK/day). The last couple of days I finally managed to adjust the sensors to correctly calculate bought electricity (nordpool spot price incl VAT, energy tax, transmission fees etc.) and sold electricity (spot price only).
Prior to the two days with extreme cost I had one sensor for costs (nordpool + VAT only) running for 6-7 months.
Now I would love to fix the two extreme days and also the days before that. I’m afraid of fiddling with SQL-databases but I’ve done it in the past with some guidance so I’m willing to do this again. I’m most likely using the default SQL database which I believe is SQLlite.
As all of my kWh values are correct I’m hoping it would be possible to just change the cost algorithm (or perhaps column describes it better) if that’s even possible?
Below is a fictive example trying to illustrate my cost value issue:
day 1 - 45 kWh * 1,25SEK/kWh (spot price: 1SEK + VAT)
day 51 - 45 kWh * 1,25SEK/kWh (spot price: 1SEK + VAT)
day 184 - 45 kWh * 200SEK/kWh (spot price: 100SEK + VAT, Energy tax, transmission fees etc.)
day 185 - 45 kWh * 200SEK/kWh (spot price: 100SEK + VAT, Energy tax, transmission fees etc.)
day 186 (today) - 45 kWh * 2SEK/kWh (spot price: 1SEK + VAT, Energy tax, transmission fees etc.)
I would like to adjust all days between day 1 up to, and including, day 185 to use the same formula as day 186 (spot price + VAT + Energy tax + transmission fees). If not possible then I would be very thankful to hear how to solve this in the best way please?
Many thanks in advance!