diff options
author | Christian Brunner <chb@muc.de> | 2016-09-13 22:27:43 +0200 |
---|---|---|
committer | Christian Brunner <chb@muc.de> | 2016-09-15 17:56:45 +0200 |
commit | de4b7f2603270cdf868e22245924cb51afd57934 (patch) | |
tree | c0ed2eb81fe8468bba0681bcc7bf3bfcf1576f39 | |
parent | 8ce825db2570d06a868fd89cb7518cad6169284e (diff) |
add RecallScene
-rw-r--r-- | scene.go | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -88,6 +88,12 @@ func (bridge *Bridge) GetSceneByName(name string) (Scene, error) { return Scene{}, errors.New(errOut) } +// Bridge.RecallScene recalls a scene +func (bridge *Bridge) RecallScene(id string) error { + action := &Action{Scene: id} + return bridge.SetGroupState(0, action) +} + // Bridge.CreateScene posts a new scene configuration to the bridge. func (bridge *Bridge) CreateScene(scene Scene) error { uri := fmt.Sprintf("/api/%s/scenes/", bridge.Username) |