I’ve been searching the forum for an answer to my question, but haven’t found it. Hopefully someone can help me.
Like many others I want to calculate my daily, monthly and yearly energy costs. So to calculate usage I use utility_meter with peak and off_peak and to calculate costs I have multiple template_sensors. This works fine when tariffs don’t change, but when they do, I run into a simple issue.
Let’s say I want to calculate my yearly energy costs when the price for a kWh is €1 January-May and €2 June-December. If I multiply the yearly usage by the current tariff, then the usage of the entire year will be multiplied by €2, which of course it shouldn’t. I’m sure there is a simple solution, but I don’s see it. Anyone who can help me?
Good to know I’m not alone in this… The only “solution” I’ve come up with is creating multiple template sensors for each tariff period and another sensor to add them for total yearly costs. Not perfect…