Fixed missing check for none value

This commit is contained in:
Mark Qvist 2023-12-05 21:00:42 +01:00
parent c39b7ac148
commit 6120c1dd31
1 changed files with 1 additions and 1 deletions

View File

@ -814,7 +814,7 @@ class Location(Sensor):
if slat != None and slon != None:
s = relative_to.sensors["location"]
d = s.data
if "latitude" in d and "longitude" in d and "altitude" in d:
if d != None and "latitude" in d and "longitude" in d and "altitude" in d:
lat = d["latitude"]; lon = d["longitude"]; alt = d["altitude"]
if lat != None and lon != None:
if alt == None: alt = 0