The imperial unit system is deprecated (2025.1)

As i upgraded to 2025.1 i got the warning “The imperial unit system is deprecated”

I have a configuration.yaml file. So apparenty you can’t use anything under the homeassistant: tag. So a few questions:

  1. If i remove the homeassistant: tag to enabble locaiton setup via UI, i also have to delete the packages key, internal URL and other unrelated configuration settings that go under homeassistant:. So what is the right way to enable UI configuration for my location, units etc?

  2. Is there a simple way to replace the “unit: imperial” with something new? I tried: “US_CUSTOMARY_SYSTEM” and it doesn’t work/boot. What should i do then?

thanks

3 Likes

I just deleted the…

unit_system: imperial

…line from my configuration.yaml file and restarted and it was fine.

when i do that, some sensors default units change to celsius and the overall unit system in ‘general’ shows as metric. So when you delete this everything switches to metric by default. So that option is not working for me

Use us_customary

4 Likes

great. thanks. it works! this is nowhere in any documentation. Not sure if there is a way to flag it or open an issue somewhere, but this is it.

It actually is in the documentation, but it certainly wasn’t the first place I looked either. Home Assistant Core Integration - Home Assistant

you are right. Hard to find though, it should be an easy mention in the deprecation warning to help many others that may run into this

4 Likes

Using “unit_system: us_customary” in my config yaml, I’m getting the red trailing error that says: ‘Value is not accepted. Valid values: “Imperial”, “metric”.’

Confirmed I’m using Core 2025.1.0.

I use a venv, so I’m editing these in vim, but this sounds like you have an editor with some sort of linter? If so, it’s out of date, it should be us_customary or metric.

Same error. Im using Studio Code Server to edit it, but confirmed that HA is 2025.1.0.

I just excited SCS, reload, and it seems fine.

yeah, maybe SCS needs an update, i changed it and it works fine despite the warning in VSCode

Is this some political thing?

No, it was just named incorrectly. They’re two different units of measurement. For example, an imperial gallon is ~4.55L whereas a US customary gallon is ~3.78L.
Comparison of the imperial and US customary measurement systems - Wikipedia

If I remember correctly, this was changed a long time ago (for example see this post from 2023: Question 'homeassistant: ') so it’s weird you only hit it recently.