From be903800198dfe07237f3cb5355d4237a0443432 Mon Sep 17 00:00:00 2001 From: MartinRinas Date: Mon, 27 Jan 2025 14:54:06 +0100 Subject: [PATCH] return timestamp as seconds, not milliseconds --- packages/modules/vehicles/smarthello/api.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/modules/vehicles/smarthello/api.py b/packages/modules/vehicles/smarthello/api.py index fde9d2b54a..7dc3512a08 100644 --- a/packages/modules/vehicles/smarthello/api.py +++ b/packages/modules/vehicles/smarthello/api.py @@ -358,6 +358,6 @@ def fetch_soc(config: SmartHelloConfiguration, soc = float(data["additionalVehicleStatus"]["electricVehicleStatus"]["chargeLevel"]) autonomy = float(data["additionalVehicleStatus"]["electricVehicleStatus"]["distanceToEmptyOnBatteryOnly"]) - soctimestamp = float(data["updateTime"]) + soctimestamp = float(data["updateTime"])/1000 return CarState(soc=soc, range=autonomy, soc_timestamp=soctimestamp)