Skip to content

Commit

Permalink
Add base light state to have a common state for lights.
Browse files Browse the repository at this point in the history
  • Loading branch information
kanimaru committed Feb 26, 2023
1 parent 99367e8 commit bcb93a7
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions ws/state.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,29 +7,29 @@ type StateDaylight struct {
// FIXME HERE ARE MISSING FIELDS
}

type StateBaseLight struct {
Alert interface{} `json:"alert,omitempty"`
Bri int `json:"bri,omitempty"`
On bool `json:"on,omitempty"`
}

type StateDimmablelight struct {
Alert interface{} `json:"alert,omitempty"`
Bri int `json:"bri,omitempty"`
On bool `json:"on,omitempty"`
Reachable bool `json:"reachable,omitempty"`
StateBaseLight
Reachable bool `json:"reachable,omitempty"`
}

type StateColortemperaturelight struct {
Alert string `json:"alert"`
Bri int `json:"bri"`
StateBaseLight
Colormode string `json:"colormode"`
Ct int `json:"ct"`
On bool `json:"on"`
Reachable bool `json:"reachable"`
}

type StateExtendedcolorlight struct {
// FIXME HERE ARE MISSING FIELDS
Alert string `json:"alert"`
Bri int `json:"bri"`
StateBaseLight
Colormode string `json:"colormode"`
Ct int `json:"ct"`
On bool `json:"on"`
Reachable bool `json:"reachable"`
}

Expand Down

0 comments on commit bcb93a7

Please sign in to comment.