mirror of
https://github.com/home-assistant/core.git
synced 2025-07-22 12:47:08 +00:00
Fix bmw_connected_drive battery icon (#56884)
This commit is contained in:
parent
c0016415aa
commit
451199338c
@ -513,6 +513,9 @@ class BMWConnectedDriveSensor(BMWConnectedDriveBaseEntity, SensorEntity):
|
|||||||
self._attr_entity_registry_enabled_default = attribute_info.get(
|
self._attr_entity_registry_enabled_default = attribute_info.get(
|
||||||
attribute, [None, None, None, True]
|
attribute, [None, None, None, True]
|
||||||
)[3]
|
)[3]
|
||||||
|
self._attr_icon = self._attribute_info.get(
|
||||||
|
self._attribute, [None, None, None, None]
|
||||||
|
)[0]
|
||||||
self._attr_device_class = attribute_info.get(
|
self._attr_device_class = attribute_info.get(
|
||||||
attribute, [None, None, None, None]
|
attribute, [None, None, None, None]
|
||||||
)[1]
|
)[1]
|
||||||
@ -570,6 +573,3 @@ class BMWConnectedDriveSensor(BMWConnectedDriveBaseEntity, SensorEntity):
|
|||||||
self._attr_icon = icon_for_battery_level(
|
self._attr_icon = icon_for_battery_level(
|
||||||
battery_level=vehicle_state.charging_level_hv, charging=charging_state
|
battery_level=vehicle_state.charging_level_hv, charging=charging_state
|
||||||
)
|
)
|
||||||
self._attr_icon = self._attribute_info.get(
|
|
||||||
self._attribute, [None, None, None, None]
|
|
||||||
)[0]
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user