Continuing kWh readout on meter replacement

I’ve noticed that this part of HASS seems a bit rough on the edges:
If I have a smart plug that reports the energy used, and for some reason I replace that plug and give it exactly the same name - entity value will drop down what the new plug thinks there is in terms of total energy used.

I know I’m dumb, but shouldn’t there be an option for cumulative entities to actually allow to provide an offset ? Let’s say I replace a plug that I know totaled to 200kWh, and I replace it with a spare plug that has only 5kWh on it - I in my dumb mind woukd assume that there should be an option somewhere to “provide offset to readout’s from time X to time Y” that way the graphs plot nicelly.

I know, I know, I can create an energy meter or integration sensor in place of an old one - however those don’t allow to provide a start value … further more, if replacing the device with a spare that you’ve got kicking about, energy meter has an option that value “can reset to 0” and it will automatically take this into consideration - GREAT - but if value reset it self to 5kWh, then what ?! I’m toast ?

I might add that this also is a problem if one replaces there main meter device.

weeeeeeeeeeeeeellll …
That sort of works if you create something like a energy meter. Problem is that if you replace the device (that failed for example) with new device the value of energy resets to value reported by the new device. I’ve got power plugs that do provide their own energy accumulated readouts - and after putting it in place of the old one, it just resets to new values. Below is an example:


So only work around is:

  1. rename the device
  2. create energy meter in place of the old one energy readout AND SET “readout can sometimes reset to zero”
  3. remove the device
  4. add new device (or rename other spare device) and name it the same as old device
  5. hass will create a new another energy entity that ties to mqtt provided energy - usually olddevicename_energy_2
  6. set the energy meter you’ve created to point it to energy_2
  7. now hass will take current value of energy_2 and treat it as an offset, and from here on it will be accumulating on top of the olde device values.