From 451199338cf284fd9e6602a904169c43b7eeefab Mon Sep 17 00:00:00 2001 From: Marc Mueller <30130371+cdce8p@users.noreply.github.com> Date: Fri, 1 Oct 2021 18:27:32 +0200 Subject: [PATCH] Fix bmw_connected_drive battery icon (#56884) --- homeassistant/components/bmw_connected_drive/sensor.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/homeassistant/components/bmw_connected_drive/sensor.py b/homeassistant/components/bmw_connected_drive/sensor.py index 76d183bf8e8..104a2eb78d9 100644 --- a/homeassistant/components/bmw_connected_drive/sensor.py +++ b/homeassistant/components/bmw_connected_drive/sensor.py @@ -513,6 +513,9 @@ class BMWConnectedDriveSensor(BMWConnectedDriveBaseEntity, SensorEntity): self._attr_entity_registry_enabled_default = attribute_info.get( attribute, [None, None, None, True] )[3] + self._attr_icon = self._attribute_info.get( + self._attribute, [None, None, None, None] + )[0] self._attr_device_class = attribute_info.get( attribute, [None, None, None, None] )[1] @@ -570,6 +573,3 @@ class BMWConnectedDriveSensor(BMWConnectedDriveBaseEntity, SensorEntity): self._attr_icon = icon_for_battery_level( battery_level=vehicle_state.charging_level_hv, charging=charging_state ) - self._attr_icon = self._attribute_info.get( - self._attribute, [None, None, None, None] - )[0]