hueplusplus  1.0.0
Public Member Functions | List of all members
hueplusplus::CreateScene Class Reference

Parameters for creating a new Scene. More...

#include <hueplusplus/Scene.h>

Public Member Functions

CreateScenesetName (const std::string &name)
 Set name. More...
 
CreateScenesetGroupId (int id)
 Set group id, making the scene a GroupScene. More...
 
CreateScenesetLightIds (const std::vector< int > &ids)
 Set light ids, making the scene a LightScene. More...
 
CreateScenesetRecycle (bool recycle)
 Set whether the scene can be automatically deleted. More...
 
CreateScenesetAppdata (const std::string &data, int version)
 Set app specific data. More...
 
CreateScenesetLightStates (const std::map< int, LightState > &states)
 Set light states of the scene. More...
 
nlohmann::json getRequest () const
 Get request to create the scene. More...
 

Detailed Description

Parameters for creating a new Scene.

Can be used like a builder object with chained calls.

Member Function Documentation

◆ getRequest()

nlohmann::json hueplusplus::CreateScene::getRequest ( ) const

Get request to create the scene.

Returns
JSON request for a POST to create the new scene

◆ setAppdata()

CreateScene & hueplusplus::CreateScene::setAppdata ( const std::string &  data,
int  version 
)

Set app specific data.

See also
Scene::setAppdata

◆ setGroupId()

CreateScene & hueplusplus::CreateScene::setGroupId ( int  id)

Set group id, making the scene a GroupScene.

Parameters
idGroup id for the scene, not 0

The group id cannot be changed after the scene was created.

Exceptions
HueExceptionwhen used after setLightIds

◆ setLightIds()

CreateScene & hueplusplus::CreateScene::setLightIds ( const std::vector< int > &  ids)

Set light ids, making the scene a LightScene.

Parameters
idsIds of lights in the scene
Exceptions
HueExceptionwhen used after setGroupId

◆ setLightStates()

CreateScene & hueplusplus::CreateScene::setLightStates ( const std::map< int, LightState > &  states)

Set light states of the scene.

When omitted, the current light states are stored.

See also
Scene::setLightStates

◆ setName()

CreateScene & hueplusplus::CreateScene::setName ( const std::string &  name)

Set name.

See also
Scene::setName

◆ setRecycle()

CreateScene & hueplusplus::CreateScene::setRecycle ( bool  recycle)

Set whether the scene can be automatically deleted.

Cannot be changed after the scene was created.


The documentation for this class was generated from the following files: