aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Brunner <chb@muc.de>2016-09-13 22:27:43 +0200
committerChristian Brunner <chb@muc.de>2016-09-15 17:56:45 +0200
commitde4b7f2603270cdf868e22245924cb51afd57934 (patch)
treec0ed2eb81fe8468bba0681bcc7bf3bfcf1576f39
parent8ce825db2570d06a868fd89cb7518cad6169284e (diff)
add RecallScene
-rw-r--r--scene.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/scene.go b/scene.go
index 3358a1b..9339893 100644
--- a/scene.go
+++ b/scene.go
@@ -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)