I have a couple of Utility Meter helpers for tracking daily/monthly internet usage. The input sensor they’re watching provides data in ‘B’, which is great for tracking small amounts over short periods, but is not very useful when dealing with hundreds of gigabytes, so the helpers units are set to ‘GB’.
Mostly that works fine, but any time I restart HA, the first sample recorded by the utility meters is stored in ‘B’ before switching back to ‘GB’.
This makes the graph useless because that one spike compresses all the rest of the data into a single pixel line:
Interesting… The two source sensors (“Data Received” and “Data Sent”) are doing the opposite on startup: Their B data is momentarily recording as GB (though still showing units of “B”):
It has nothing to do with the unit. The problem is that your OpenWRT sensor is reporting near 0 instead of unavailable after the restart. So when it finally recovers to the present value the utility meter counts all that massive jump up from near 0 as actual use. Going from unavailable back to the current value would not be counted.
You need to report this issue. Is it a third party or core integration?
Actually, ignore that previous message; I realized too late that the sample point in that graph is from when I briefly tried changing the source sensors units from B to GB, which is what caused the (correct) change in the displayed values.
I restarted HA just now, and the source sensors show no change, just normal values:
I went back to that experiment, and have now changed the source sensors units to GB. That appears to have fixed the Utility Meters values spiking on a restart, so I’m going to roll with that and see what kind of side effects might crop up (e.g. floating point errors as the source data values grow into the tens of trillions).
This is your issue. I recently suffered the same problem. Purge the entity history and the problem will go away (read: the problematic rows need to drop out of your recorder window).
Basically, if the recorder has mixed unit history, you’re going to have issues.