From f232eaf3653f7ae55f749cceb170760747329da9 Mon Sep 17 00:00:00 2001 From: Jakob Schlyter Date: Mon, 9 Dec 2024 13:06:24 +0100 Subject: [PATCH] remove more round() --- custom_components/polestar_api/polestar.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/custom_components/polestar_api/polestar.py b/custom_components/polestar_api/polestar.py index a45612d..1e0bf19 100644 --- a/custom_components/polestar_api/polestar.py +++ b/custom_components/polestar_api/polestar.py @@ -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,