mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 13:17:32 +00:00
mychevy: Fix wrong attribute on battery level selector (#20016)
The battery level sensor is broken because the logic for determining if the battery is charged accessed the wrong variable. This one character fix makes it work again.
This commit is contained in:
parent
22c0733d8e
commit
218c82eaf3
@ -141,7 +141,7 @@ class EVSensor(Entity):
|
||||
def icon(self):
|
||||
"""Return the icon."""
|
||||
if self._attr == BATTERY_SENSOR:
|
||||
charging = self.state_attributes.get("charging", False)
|
||||
charging = self._state_attributes.get("charging", False)
|
||||
return icon_for_battery_level(self.state, charging)
|
||||
return self._icon
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user