Skip to content

Commit

Permalink
fix: oil_level Issue 297 (#320)
Browse files Browse the repository at this point in the history
  • Loading branch information
Kolbi authored Apr 2, 2024
1 parent 87d68ca commit 2bd0558
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions custom_components/audiconnect/audi_connect_account.py
Original file line number Diff line number Diff line change
Expand Up @@ -882,13 +882,13 @@ def oil_level(self):
"""Return oil level percentage"""
if self.oil_level_supported:
val = self._vehicle.fields.get("OIL_LEVEL_DIPSTICKS_PERCENTAGE")
if isinstance(val, bool):
if val:
return 100
else:
return 1
elif parse_float(val):
return parse_float(val)
if isinstance(val, bool):
if val:
return 100
else:
return 1
elif parse_float(val):
return parse_float(val)

@property
def oil_level_supported(self):
Expand Down

0 comments on commit 2bd0558

Please sign in to comment.