mirror of
https://github.com/home-assistant/core.git
synced 2025-04-23 16:57:53 +00:00
Allow gas units to be overriden (#80884)
This commit is contained in:
parent
3d3349240f
commit
6b1f503a79
@ -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,
|
||||
|
Loading…
x
Reference in New Issue
Block a user