Skip to content

Commit

Permalink
remove more round()
Browse files Browse the repository at this point in the history
  • Loading branch information
jschlyter committed Dec 9, 2024
1 parent b1f18cc commit f232eaf
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions custom_components/polestar_api/polestar.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,15 +133,10 @@ def update_odometer(self) -> None:
"""Update data with current car odometer readings"""

if data := self.polestar_api.get_car_odometer(self.vin):
average_speed_km_per_hour = (
round(data.average_speed_km_per_hour)
if data.average_speed_km_per_hour
else None
)
self.data.update(
{
"current_odometer": data.odometer_meters,
"average_speed": average_speed_km_per_hour,
"average_speed": data.average_speed_km_per_hour,
"current_trip_meter_automatic": data.trip_meter_automatic_km,
"current_trip_meter_manual": data.trip_meter_manual_km,
"last_updated_odometer_data": data.event_updated_timestamp,
Expand Down

0 comments on commit f232eaf

Please sign in to comment.