Skip to content

Commit

Permalink
feat: add link state info to zone state
Browse files Browse the repository at this point in the history
  • Loading branch information
gonzolino committed Nov 19, 2021
1 parent 234d625 commit a9ff31d
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion models.go
Original file line number Diff line number Diff line change
Expand Up @@ -247,9 +247,24 @@ type ZoneStateNextTimeBlock struct {
Start time.Time `json:"start"`
}

// LinkState holds the state of a link (online or offline)
type LinkState string

const (
LinkStateOnline LinkState = "ONLINE"
LinkStateOffline LinkState = "OFFLINE"
)

// ZoneStateLink holds the link information of a tado zone
type ZoneStateLink struct {
State string `json:"state"`
State string `json:"state"`
Reason ZoneStateLinkReason `json:"reason,omitempty"`
}

// ZoneStateLinkReason holds the reason why a link is offline
type ZoneStateLinkReason struct {
Code string `json:"code"`
Title string `json:"title"`
}

// ZoneStateActivityDataPoints holds activity data points for a zone
Expand Down

0 comments on commit a9ff31d

Please sign in to comment.