23 #ifndef INCLUDE_HUEPLUSPLUS_STATE_TRANSACTION_H 24 #define INCLUDE_HUEPLUSPLUS_STATE_TRANSACTION_H 32 #include "json/json.hpp" Definition: HueCommandAPI.h:37
StateTransaction & incrementBrightness(int increment)
Increment/Decrement brightness.
Definition: StateTransaction.cpp:153
Action executed by the bridge, e.g. as a Schedule command.
Definition: Action.h:35
Namespace for the hueplusplus library.
Definition: Action.h:27
nlohmann::json * state
Definition: StateTransaction.h:197
StateTransaction & setColor(const HueSaturation &hueSat)
Set light color in hue and saturation.
Definition: StateTransaction.cpp:117
Action toAction()
Create an Action from the transaction.
Definition: StateTransaction.cpp:85
StateTransaction & stopAlert()
Stop an ongoing long alert.
Definition: StateTransaction.cpp:201
StateTransaction & longAlert()
Trigger a long alert (15s).
Definition: StateTransaction.cpp:196
StateTransaction & setColorTemperature(unsigned int mired)
Set light color temperature.
Definition: StateTransaction.cpp:140
nlohmann::json request
Definition: StateTransaction.h:198
StateTransaction & setBrightness(uint8_t brightness)
Set light brightness.
Definition: StateTransaction.cpp:97
Color and brightness in CIE.
Definition: ColorUnits.h:62
StateTransaction & incrementSaturation(int increment)
Increment/Decrement saturaction.
Definition: StateTransaction.cpp:159
StateTransaction & setOn(bool on)
Turn light on or off.
Definition: StateTransaction.cpp:91
StateTransaction(const HueCommandAPI &commands, const std::string &path, nlohmann::json *currentState)
Creates a StateTransaction to a group or light state.
Definition: StateTransaction.cpp:32
StateTransaction & setColorSaturation(uint8_t saturation)
Set light saturation.
Definition: StateTransaction.cpp:104
bool commit(bool trimRequest=true)
Commit transaction and make request.
Definition: StateTransaction.cpp:36
Transaction class which can be used for either light or group state.
Definition: StateTransaction.h:61
void trimRequest()
Remove parts from request that are already set in state.
Definition: StateTransaction.cpp:207
StateTransaction & alert()
Trigger an alert.
Definition: StateTransaction.cpp:191
const HueCommandAPI & commands
Definition: StateTransaction.h:195
Color in CIE x and y coordinates.
Definition: ColorUnits.h:47
StateTransaction & incrementHue(int increment)
Increment/Decrement hue.
Definition: StateTransaction.cpp:165
StateTransaction & incrementColorXY(float xInc, float yInc)
Increment/Decrement color xy.
Definition: StateTransaction.cpp:177
StateTransaction & setColorLoop(bool on)
Enables or disables color loop.
Definition: StateTransaction.cpp:147
std::string path
Definition: StateTransaction.h:196
StateTransaction & incrementColorTemperature(int increment)
Increment/Decrement color temperature.
Definition: StateTransaction.cpp:171
StateTransaction & setTransition(uint16_t transition)
Set transition time for the request.
Definition: StateTransaction.cpp:183
Color in hue and saturation.
Definition: ColorUnits.h:31
StateTransaction & setColorHue(uint16_t hue)
Set light hue.
Definition: StateTransaction.cpp:111