---
author: epenet
authorURL: https://github.com/epenet
title: "Introducing new unit enumerators"
---

As of Home Assistant Core 2022.11, the following unit constants are deprecated and replaced 
by a corresponding enum:

  - `UnitOfEnergy` enumerator replaces `ENERGY_***` constants
  - `UnitOfLength` enumerator replaces `LENGTH_***` constants
  - `UnitOfMass` enumerator replaces `MASS_***` constants
  - `UnitOfPower` enumerator replaces `POWER_***` constants
  - `UnitOfPressure` enumerator replaces `PRESSURE_***` constants
  - `UnitOfSpeed` enumerator replaces `SPEED_***` constants
  - `UnitOfTemperature` enumerator replaces `TEMP_***` constants
  - `UnitOfVolume` enumerator replaces `VOLUME_***` constants
