Skip to content

Commit

Permalink
Fix BMW remaining fuel device class (home-assistant#119172)
Browse files Browse the repository at this point in the history
Co-authored-by: Richard <rikroe@users.noreply.github.com>
  • Loading branch information
rikroe and rikroe authored Jul 15, 2024
1 parent 894f3fe commit 99f01ac
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion homeassistant/components/bmw_connected_drive/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ class BMWSensorEntityDescription(SensorEntityDescription):
BMWSensorEntityDescription(
key="fuel_and_battery.remaining_fuel",
translation_key="remaining_fuel",
device_class=SensorDeviceClass.VOLUME,
device_class=SensorDeviceClass.VOLUME_STORAGE,
native_unit_of_measurement=UnitOfVolume.LITERS,
state_class=SensorStateClass.MEASUREMENT,
suggested_display_precision=0,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,7 @@
'suggested_display_precision': 0,
}),
}),
'original_device_class': <SensorDeviceClass.VOLUME: 'volume'>,
'original_device_class': <SensorDeviceClass.VOLUME_STORAGE: 'volume_storage'>,
'original_icon': None,
'original_name': 'Remaining fuel',
'platform': 'bmw_connected_drive',
Expand All @@ -420,7 +420,7 @@
# name: test_entity_state_attrs[sensor.i3_rex_remaining_fuel-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'device_class': 'volume',
'device_class': 'volume_storage',
'friendly_name': 'i3 (+ REX) Remaining fuel',
'state_class': <SensorStateClass.MEASUREMENT: 'measurement'>,
'unit_of_measurement': <UnitOfVolume.LITERS: 'L'>,
Expand Down Expand Up @@ -3253,7 +3253,7 @@
'suggested_display_precision': 0,
}),
}),
'original_device_class': <SensorDeviceClass.VOLUME: 'volume'>,
'original_device_class': <SensorDeviceClass.VOLUME_STORAGE: 'volume_storage'>,
'original_icon': None,
'original_name': 'Remaining fuel',
'platform': 'bmw_connected_drive',
Expand All @@ -3267,7 +3267,7 @@
# name: test_entity_state_attrs[sensor.m340i_xdrive_remaining_fuel-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'device_class': 'volume',
'device_class': 'volume_storage',
'friendly_name': 'M340i xDrive Remaining fuel',
'state_class': <SensorStateClass.MEASUREMENT: 'measurement'>,
'unit_of_measurement': <UnitOfVolume.LITERS: 'L'>,
Expand Down

0 comments on commit 99f01ac

Please sign in to comment.