Skip to content

Commit 2c8c8da

Browse files
committed
fix normalizing radio band identifier
1 parent 9d7ff34 commit 2c8c8da

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

exporter/api_types.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,9 @@ func (radio radioResponse) Normalize() (r Radio) {
7070
}
7171

7272
switch radio.Band {
73-
case "2.4GHz":
73+
case "2.4GHz", "2.4 GHz":
7474
r.Band = BandBGN
75-
case "5GHz":
75+
case "5GHz", "5 GHz":
7676
r.Band = BandAC
7777
}
7878

exporter/collector.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,10 @@ type PortalCollector struct {
1919
ctx context.Context // HTTP request context
2020
}
2121

22-
var _ prometheus.Collector = (*Collector)(nil)
22+
var (
23+
_ prometheus.Collector = (*Collector)(nil)
24+
_ prometheus.Collector = (*PortalCollector)(nil)
25+
)
2326

2427
const namespace = "cambium_maestro"
2528

0 commit comments

Comments
 (0)