Adjusting incorrect utility meter not possible

Hi!

I configured a utility meter, via frontend (helper). It is counting the daily/monthly/yearly growth of a sensor (heat output) in kwh.

The integration the sensor values come from made some trouble. Way to high values where set (60.000 instead of 3000). I tried to set the sensor to a special value via service, but that leads to an error:

Logger: homeassistant.helpers.service
Source: helpers/service.py:833
First occurred: 15:29:26 (1 occurrences)
Last logged: 15:29:26

Referenced entities sensor.heat_amount_yearly are missing or not currently available

I can set the value manually via developer tools. I can delete all entries from “statistics”. But an after a restart of HA, the counter shows 60.000 again.

I am not sure what to do, how to correct it. Sure, I could make a new counter, but doing this, I would loose all longterm statistics. There must be a way. What am I doing wrong?

Regards.
Seb

A counter is not really the best entity for accumulating energy.

If you had used the Utility Meter you could use the calibrate service to adjust it.

To edit statistics go to Developer Tools → Statistics. Click on the ramp icon to the right of your entity. Navigate to the time and date of the erroneous value and correct it.

Sorry, it is a utility meter. Made a translation mistake here.

But how can I adjust it?

my translation mistake explains, why “set counter” was not working :wink:

Using the calibration service I had a little bit of trouble, because the value set itself back to the former value after reboot, but now It seems to be stable and correct.

Thx a lot