Skip to content

Commit

Permalink
Fix bmw_connected_drive battery icon (home-assistant#56884)
Browse files Browse the repository at this point in the history
  • Loading branch information
cdce8p authored Oct 1, 2021
1 parent c001641 commit 4511993
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions homeassistant/components/bmw_connected_drive/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -513,6 +513,9 @@ def __init__(self, account, vehicle, attribute: str, attribute_info, service=Non
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]
Expand Down Expand Up @@ -570,6 +573,3 @@ def update(self) -> None:
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]

0 comments on commit 4511993

Please sign in to comment.