From 8fa5c73c51dacd6c8de2ebc631eec18248d58036 Mon Sep 17 00:00:00 2001 From: davidnewhall2 Date: Sat, 13 Jun 2020 20:37:08 -0700 Subject: [PATCH] Split temperatures out --- core/unifi/udm.go | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/core/unifi/udm.go b/core/unifi/udm.go index 1b406e54..aba1231c 100644 --- a/core/unifi/udm.go +++ b/core/unifi/udm.go @@ -69,13 +69,9 @@ type UDM struct { MaxMirrorSessions FlexInt `json:"max_mirror_sessions"` MaxAggregateSessions FlexInt `json:"max_aggregate_sessions"` } `json:"switch_caps"` - HasFan FlexBool `json:"has_fan"` - Temperatures []struct { - Name string `json:"name"` - Type string `json:"type"` - Value float64 `json:"value"` - } `json:"temperatures"` - RulesetInterfaces interface{} `json:"ruleset_interfaces"` + HasFan FlexBool `json:"has_fan"` + Temperatures Temperatures `json:"temperatures"` + RulesetInterfaces interface{} `json:"ruleset_interfaces"` /* struct { Br0 string `json:"br0"` Eth0 string `json:"eth0"` @@ -135,6 +131,12 @@ type UDM struct { NumHandheld FlexInt `json:"num_handheld"` // USG } +type Temperatures []struct { + Name string `json:"name"` + Type string `json:"type"` + Value float64 `json:"value"` +} + // NetworkTable is the list of networks on a gateway. type NetworkTable []struct { ID string `json:"_id"`