View Source HueSDK.API.Groups (HueSDK v0.1.1)

Interface to the Groups API.

See the official documentation for more information.

Link to this section Summary

Functions

Creates a new group containing the lights specified and optional name. A new group is created in the bridge with the next available id.

Deletes the specified group from the bridge.

Gets a list of all groups that have been added to the bridge. A group is a list of lights that can be created, modified and deleted by a user.

Gets the group attributes, e.g. name, light membership and last command for a given group.

Allows the user to modify the name, light and class membership of a group.

Modifies the state of all lights in a group.

Link to this section Functions

Link to this function

create_group(bridge, name, type, light_ids)

View Source
@spec create_group(HueSDK.Bridge.t(), String.t(), String.t(), [String.t()]) ::
  HueSDK.HTTP.response()

Creates a new group containing the lights specified and optional name. A new group is created in the bridge with the next available id.

Link to this function

delete_group(bridge, group_id)

View Source
@spec delete_group(HueSDK.Bridge.t(), String.t()) :: HueSDK.HTTP.response()

Deletes the specified group from the bridge.

@spec get_all_groups(HueSDK.Bridge.t()) :: HueSDK.HTTP.response()

Gets a list of all groups that have been added to the bridge. A group is a list of lights that can be created, modified and deleted by a user.

Link to this function

get_group_attributes(bridge, group_id)

View Source
@spec get_group_attributes(HueSDK.Bridge.t(), String.t()) :: HueSDK.HTTP.response()

Gets the group attributes, e.g. name, light membership and last command for a given group.

Link to this function

set_group_attributes(bridge, group_id, attributes)

View Source
@spec set_group_attributes(HueSDK.Bridge.t(), String.t(), map()) ::
  HueSDK.HTTP.response()

Allows the user to modify the name, light and class membership of a group.

Link to this function

set_group_state(bridge, group_id, state)

View Source
@spec set_group_state(HueSDK.Bridge.t(), String.t(), map()) :: HueSDK.HTTP.response()

Modifies the state of all lights in a group.