As Belgians probably know, part of our energy bill will soon be based on something they call “capacity tarif”, which is based on the highest average power consumption over any 15 minute window per month. Im actually unsure if this is measured/calculated in fixed 15 minute windows (eg from 18:00 to 18:15 and 18:15 to 18:30 etc) or any arbitrary 15 minute window, so it could be that your peak occurred between 18:02 and 18:17. Its probably not gonna make a huge difference, but if anyone knows, please share.
To calculate this (and Im assuming “worst case”, an arbitrary window) I cobbled up a node red flow :
Once per minute it adds both tariff kWh values, stores the total, waits 15 minutes, then compares it with the current meter values and calculates the average power usage W over those 15 min and stores it in a HA entity.
I still have to make a sensor that stores the peak value once per month and enable long term storage for that, but so far this works fine. However, I mess a lot in Node red, and every time I restart my flows, I lose 15 minutes worth of measuring and risk missing the peak for that month.
Does anyone have a better solution?