Skip to content

Commit

Permalink
Reduce risk on errors when ac registration is unknown
Browse files Browse the repository at this point in the history
  • Loading branch information
vingerha committed Jun 7, 2024
1 parent f096e15 commit 6952e60
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion custom_components/adsb_lol/adsb_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def get_point_of_interest(self):
for ac in response.json()["ac"]:
if self._altitude_limit == 0 or (self._altitude_limit > 0 and ac.get("alt_geom",0) < self._altitude_limit * 1000 / 0.3048 ):
aircraft["callsign"] = ac.get("flight", None)
aircraft["registration"] = ac.get("r", None)
aircraft["registration"] = ac.get("r", "NoReg")
self._reg = ac.get("r", "NoReg")
aircraft["icao24"] = ac.get("hex", None)
aircraft["type"] = ac.get("t", None)
Expand Down

0 comments on commit 6952e60

Please sign in to comment.