Skip to content

Commit

Permalink
Add method to retrieve scenes in a specific zone
Browse files Browse the repository at this point in the history
  • Loading branch information
albertomontesg committed May 3, 2022
1 parent fa62168 commit 6412760
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions digitalstrom/http-client.go
Original file line number Diff line number Diff line change
Expand Up @@ -192,9 +192,6 @@ func (httpClient *HttpClient) ZoneCallAction(zoneId int, action Action) (*Digita
return httpClient.get("json/zone/callAction", params)
}

// func (httpClient *HttpClient) ZoneGetReachableScenes(zoneId int) (*DigitalStromResponse, error) {
// }

func (httpClient *HttpClient) ZoneSceneGetName(zoneId int, groupId int, sceneId int) (*DigitalStromResponse, error) {
params := url.Values{}
params.Set("id", strconv.Itoa(zoneId))
Expand All @@ -203,6 +200,13 @@ func (httpClient *HttpClient) ZoneSceneGetName(zoneId int, groupId int, sceneId
return httpClient.get("json/zone/sceneGetName", params)
}

func (httpClient *HttpClient) ZoneGetReachableScenes(zoneId int, groupId int) (*DigitalStromResponse, error) {
params := url.Values{}
params.Set("id", strconv.Itoa(zoneId))
params.Set("groupID", strconv.Itoa(groupId))
return httpClient.get("json/zone/getReachableScenes", params)
}

func (httpClient *HttpClient) DeviceSetOutputChannelValue(dsid string, channelValues map[string]int) (*DigitalStromResponse, error) {
params := url.Values{}
params.Set("dsid", dsid)
Expand Down

0 comments on commit 6412760

Please sign in to comment.