forked from amimof/huego
-
Notifications
You must be signed in to change notification settings - Fork 0
/
scene.go
27 lines (25 loc) · 1.01 KB
/
scene.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
package huego
// Scene represents a bridge scene https://developers.meethue.com/documentation/scenes-api
type Scene struct {
Name string `json:"name,omitempty"`
Lights []string `json:"lights,omitempty"`
Owner string `json:"owner,omitempty"`
Recycle bool `json:"recycle,omitempty"`
Locked bool `json:"locked,omitempty"`
AppData interface{} `json:"appdata,omitempty"`
Picture string `json:"picture,omitempty"`
LastUpdated string `json:"lastupdated,omitempty"`
Version int `json:"version,omitempty"`
StoreSceneState bool `json:"storescenestate,omitempty"`
LightStates map[int]State `json:"lightstates,omitempty"`
ID string `json:"-"`
bridge *Bridge
}
// Recall will recall the scene in the group identified by id
func (s *Scene) Recall(id int) error {
_, err := s.bridge.RecallScene(s.ID, id)
if err != nil {
return err
}
return nil
}