Utility Meter: change/reset unit of measurement

during initial setup I made a mistake and set monthly variable to collect data from power sensor where unit is Watt. Later I changed the source of data and set it correctly to get data from sensor in kWh.
It seems collect correct value BUT the unit of measurement remains “W” !!
I tried to disable the Utility integration - restart HA - and set integration again… but it does not help…
How can I set correct inherited unit of measurement of the utility_meter sensors?

delete your database or wait until the database is purged

Well, I purged the db and then I renamed /config/home-assistant_v2.db . but in either case it did not help… the units are still in Watt.

Could it be purging is no longer resetting values for statistical history sensors? So trying to correct a wrong UoM for a long-term-statistics enabled sensor will not be possible anymore with purge entities service?

I have similar issues where i initially created a meter as ‘L’ for liters instead of ‘l’ and now it won’t be recognized as liters anywhere else.

Long term stats did not exist when this post was made, please don’t revive old posts. You can correct long term statistics in developer tools → statistics → entity in question → fix issue.

1 Like