From d3baecc569e2e6cb16410f3ad6a2caa1f9cc4dc0 Mon Sep 17 00:00:00 2001 From: cdnninja Date: Sat, 12 Oct 2024 09:37:19 -0600 Subject: [PATCH] fix: geocode error (#650) https://github.com/Hyundai-Kia-Connect/kia_uvo/issues/946 --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- hyundai_kia_connect_api/Vehicle.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/hyundai_kia_connect_api/Vehicle.py b/hyundai_kia_connect_api/Vehicle.py index 26545494..3157284a 100644 --- a/hyundai_kia_connect_api/Vehicle.py +++ b/hyundai_kia_connect_api/Vehicle.py @@ -313,8 +313,12 @@ def geocode(self): @geocode.setter def geocode(self, value): - self._geocode_name = value[0] - self._geocode_address = value[1] + if value: + self._geocode_name = value[0] + self._geocode_address = value[1] + else: + self._geocode_name = None + self._geocode_address = None @property def total_driving_range(self):