Cheers for the thought/work.
I'm actually using this:
... Which I've found to be awesome.
The issue with these plugs appears to be that sometimes, if you pull the power (the other half does this occasionally because she's annoying - I need to hide them!). When power is restored, the current 'energy total' isn't always saved correctly on the device. I'm assuming this isn't saved 'in real time' and is instead periodically written to the device's flash?
This results is slightly out of whack energy readings.
See the results here:
Edit
Also, the devices rely on their individual tasmota timesettings, per device. This caused a fair bit of confusion at the start, and I'm not going to fanny around attempting to check/ensure each plug has the time set correctly. Stuff that, I'd rather work from a hubitat clock. This obviously also screwed the 'energy today' figures, and thus my approach is now to take stock of the first reading of the actual day, and calculate from there using timestamps to compare.
/edit
For this reason I've knocked up a fairly horrible bit of webcore, but it works. Essentially whenever a figure is saved as a webcore variable for that day, it records a timestamp. If that 'daily timestamp' has expired (midnight), then it's overwritten as a new week and wipes the remainder of the week's figures, because it assumes the plug has been left out of the socket for too long. Same deal for weekly figures (I want to see last week and this week).
Also, if the energy reading for that day is somehow slightly less than the end figure from yesterday (should be impossible, but this happens when unplugged for a bit), then that day is essentially zerod from then and a new set of figures for that day begins.
It's never out by far (a few pence at a guess), but it satisfies my ocd.
As I said, horrible bit of webcore but currently perfect for my needs.
I just need to work on tracking total time on/off, taking into account midnight crossovers, which'll allow me to calculate actual costs per hour per device and allow me to add some decent restrictions for "only allowed to run for x amount of time per day" or "max cost per day".
Out of curiosity, here's my bathroom dehumidifier, running in at a total of 7p for the week so far (although I only applied the code late last night and it's about 6am here Tuesday now).
Also, the washing machine which had one cycle yesterday (26p) and is currently mid cycle this morning (2p) - using different settings to see the actual difference in cost using different temperature cycles...