From eeb36a15c0a849b93d6a087d8db04085854f1171 Mon Sep 17 00:00:00 2001 From: Simon Gurcke Date: Tue, 18 Jan 2022 17:07:53 +1000 Subject: [PATCH] Fix get_location() not updating if car facing north --- teslajsonpy/homeassistant/gps.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/teslajsonpy/homeassistant/gps.py b/teslajsonpy/homeassistant/gps.py index 3a4b0630..5d726e20 100644 --- a/teslajsonpy/homeassistant/gps.py +++ b/teslajsonpy/homeassistant/gps.py @@ -48,7 +48,7 @@ def __init__(self, data, controller): def get_location(self): """Return the current location.""" - if self.__longitude and self.__latitude and self.__heading: + if self.__longitude is not None and self.__latitude is not None and self.__heading is not None: self.__location = { "longitude": self.__longitude, "latitude": self.__latitude,