hueplusplus
1.0.0
|
Parameters for creating a new Scene. More...
#include <hueplusplus/Scene.h>
Public Member Functions | |
CreateScene & | setName (const std::string &name) |
Set name. More... | |
CreateScene & | setGroupId (int id) |
Set group id, making the scene a GroupScene. More... | |
CreateScene & | setLightIds (const std::vector< int > &ids) |
Set light ids, making the scene a LightScene. More... | |
CreateScene & | setRecycle (bool recycle) |
Set whether the scene can be automatically deleted. More... | |
CreateScene & | setAppdata (const std::string &data, int version) |
Set app specific data. More... | |
CreateScene & | setLightStates (const std::map< int, LightState > &states) |
Set light states of the scene. More... | |
nlohmann::json | getRequest () const |
Get request to create the scene. More... | |
Parameters for creating a new Scene.
Can be used like a builder object with chained calls.
nlohmann::json hueplusplus::CreateScene::getRequest | ( | ) | const |
Get request to create the scene.
CreateScene & hueplusplus::CreateScene::setAppdata | ( | const std::string & | data, |
int | version | ||
) |
Set app specific data.
CreateScene & hueplusplus::CreateScene::setGroupId | ( | int | id | ) |
Set group id, making the scene a GroupScene.
id | Group id for the scene, not 0 |
The group id cannot be changed after the scene was created.
HueException | when used after setLightIds |
CreateScene & hueplusplus::CreateScene::setLightIds | ( | const std::vector< int > & | ids | ) |
Set light ids, making the scene a LightScene.
ids | Ids of lights in the scene |
HueException | when used after setGroupId |
CreateScene & hueplusplus::CreateScene::setLightStates | ( | const std::map< int, LightState > & | states | ) |
Set light states of the scene.
When omitted, the current light states are stored.
CreateScene & hueplusplus::CreateScene::setName | ( | const std::string & | name | ) |
Set name.
CreateScene & hueplusplus::CreateScene::setRecycle | ( | bool | recycle | ) |
Set whether the scene can be automatically deleted.
Cannot be changed after the scene was created.