From 199dfa50c76980909fe30d660f016e416c2dfe73 Mon Sep 17 00:00:00 2001 From: Will Adler Date: Tue, 24 May 2022 21:54:26 -0400 Subject: [PATCH] cast odometer to float instead of int (#19) --- custom_components/leafspy/device_tracker.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/custom_components/leafspy/device_tracker.py b/custom_components/leafspy/device_tracker.py index ef47079..00d0c5e 100644 --- a/custom_components/leafspy/device_tracker.py +++ b/custom_components/leafspy/device_tracker.py @@ -170,7 +170,7 @@ def _parse_see_args(message): 'attributes': { 'amp_hours': float(message['AHr']), 'trip': int(message['Trip']), - 'odometer': int(message['Odo']), + 'odometer': float(message['Odo']), 'battery_temperature': float(message['BatTemp']), 'battery_health': float(message['SOH']), 'outside_temperature': float(message['Amb']),