diff --git a/homeassistant/components/sensor/__init__.py b/homeassistant/components/sensor/__init__.py index e353f089951..fbe12652f35 100644 --- a/homeassistant/components/sensor/__init__.py +++ b/homeassistant/components/sensor/__init__.py @@ -376,9 +376,11 @@ STATE_CLASS_TOTAL: Final = "total" STATE_CLASS_TOTAL_INCREASING: Final = "total_increasing" STATE_CLASSES: Final[list[str]] = [cls.value for cls in SensorStateClass] -UNIT_CONVERTERS: dict[str, type[BaseUnitConverter]] = { +# Note: this needs to be aligned with frontend: OVERRIDE_SENSOR_UNITS in +# `entity-registry-settings.ts` +UNIT_CONVERTERS: dict[SensorDeviceClass | str | None, type[BaseUnitConverter]] = { SensorDeviceClass.DISTANCE: DistanceConverter, - SensorDeviceClass.PRECIPITATION_INTENSITY: SpeedConverter, + SensorDeviceClass.GAS: VolumeConverter, SensorDeviceClass.PRESSURE: PressureConverter, SensorDeviceClass.SPEED: SpeedConverter, SensorDeviceClass.TEMPERATURE: TemperatureConverter,