Use UnitOfVolume in bmw_connected_drive (#84228)

This commit is contained in:
epenet 2022-12-19 12:12:48 +01:00 committed by GitHub
parent 0f40a73bb4
commit 2f19b56d5e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,5 +1,5 @@
"""Const file for the MyBMW integration."""
from homeassistant.const import VOLUME_GALLONS, VOLUME_LITERS, UnitOfLength
from homeassistant.const import UnitOfLength, UnitOfVolume
DOMAIN = "bmw_connected_drive"
ATTRIBUTION = "Data provided by MyBMW"
@ -17,6 +17,6 @@ DATA_HASS_CONFIG = "hass_config"
UNIT_MAP = {
"KILOMETERS": UnitOfLength.KILOMETERS,
"MILES": UnitOfLength.MILES,
"LITERS": VOLUME_LITERS,
"GALLONS": VOLUME_GALLONS,
"LITERS": UnitOfVolume.LITERS,
"GALLONS": UnitOfVolume.GALLONS,
}