Skip to content

Commit 7d86400

Browse files
committed
Optional GPS data
1 parent 8c34392 commit 7d86400

10 files changed

+647
-8
lines changed

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,12 @@
22

33
All notable changes to this project will be documented in this file.
44

5-
## [0.2.8] - 2025-08-09
5+
## [0.2.8] - 2025-08-12
66

77
### Changed
88

99
- Improved exception handling
10+
- GPS data optional (reported on NanoStation via HA Core Issue 150491)
1011

1112
## [0.2.7] - 2025-08-08
1213

airos/data.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,6 @@ class Remote(AirOSDataClass):
348348
cable_loss: int
349349
ethlist: list[EthList]
350350
ipaddr: list[str]
351-
gps: GPSData
352351
oob: bool
353352
unms: UnmsStatus
354353
airview: int
@@ -357,6 +356,9 @@ class Remote(AirOSDataClass):
357356
ip6addr: list[str] | None = None # For v4 only devices
358357
height: int | None = None
359358
age: int | None = None # At least not present on 8.7.11
359+
gps: GPSData | None = (
360+
None # Reported NanoStation 5AC 8.7.18 without GPS Core 150491
361+
)
360362

361363
@classmethod
362364
def __pre_deserialize__(cls, d: dict[str, Any]) -> dict[str, Any]:
@@ -556,5 +558,7 @@ class AirOS8Data(AirOSDataClass):
556558
provmode: Any
557559
ntpclient: Any
558560
unms: UnmsStatus
559-
gps: GPSMain
560561
derived: Derived
562+
gps: GPSData | None = (
563+
None # Reported NanoStation 5AC 8.7.18 without GPS Core 150491
564+
)

fixtures/airos_liteapgps_ap_ptmp_40mhz.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,14 @@
2525
},
2626
"genuine": "/images/genuine.png",
2727
"gps": {
28+
"alt": 252.5,
29+
"dim": 3,
30+
"dop": 1.52,
2831
"fix": 1,
2932
"lat": 52.379894,
30-
"lon": 4.901608
33+
"lon": 4.901608,
34+
"sats": 8,
35+
"time_synced": null
3136
},
3237
"host": {
3338
"cpuload": 59.595959,

fixtures/airos_loco5ac_ap-ptp.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,14 @@
2525
},
2626
"genuine": "/images/genuine.png",
2727
"gps": {
28+
"alt": null,
29+
"dim": null,
30+
"dop": null,
2831
"fix": 0,
2932
"lat": 52.379894,
30-
"lon": 4.901608
33+
"lon": 4.901608,
34+
"sats": null,
35+
"time_synced": null
3136
},
3237
"host": {
3338
"cpuload": 10.10101,

fixtures/airos_loco5ac_sta-ptp.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,14 @@
2525
},
2626
"genuine": "/images/genuine.png",
2727
"gps": {
28+
"alt": null,
29+
"dim": null,
30+
"dop": null,
2831
"fix": 0,
2932
"lat": 52.379894,
30-
"lon": 4.901608
33+
"lon": 4.901608,
34+
"sats": null,
35+
"time_synced": null
3136
},
3237
"host": {
3338
"cpuload": 44.0,

fixtures/airos_nanobeam5ac_sta_ptmp_40mhz.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,14 @@
2525
},
2626
"genuine": "/images/genuine.png",
2727
"gps": {
28+
"alt": null,
29+
"dim": null,
30+
"dop": null,
2831
"fix": 0,
2932
"lat": 52.379894,
30-
"lon": 4.901608
33+
"lon": 4.901608,
34+
"sats": null,
35+
"time_synced": null
3136
},
3237
"host": {
3338
"cpuload": 32.673267,

0 commit comments

Comments
 (0)