I have variable electricity price plan and an integration that provides me the current price as an entity. It even has long term statistics. I can see the price graph that holds historical price data for long periods, not only few weeks. So I’m wondering if the energry dashboard price calculator takes this variable price historical data into price calculation, for example if I want to see previous month’s cost. Will it use just current price for calculation or it will go though price history and energy consumption and calculate the final price?
Cost is calculated in realtime in parallel with consumption.
Each time your energy consumption increases, the price sensor increases by (consumption * current price). Then this cost sensor is committed to long term statistics in a similar way as the energy consumption.
So once consumption occurs, the cost is baked in and won’t be retroactively changed. When you pull up the previous months data, you’re just looking at the cost sensor statistics that were committed to LTS for that month, there is no calculations occuring to show you this data.
1 Like