LightCall & set_save(bool save)
Set whether this light call should trigger a save state to recover them at startup..
ColorMode
Color modes are a combination of color capabilities that can be used at the same time.
This class represents the communication layer between the front-end MQTT layer and the hardware outpu...
LightCall & set_color_brightness(optional< float > brightness)
Set the color brightness of the light from 0.0 (no color) to 1.0 (fully on)
LightCall & set_publish(bool publish)
Set whether this light call should trigger a publish state.
LightCall & set_red(optional< float > red)
Set the red RGB value of the light from 0.0 to 1.0.
LightCall & set_color_temperature(optional< float > color_temperature)
Set the color temperature of the light in mireds for CWWW or RGBWW lights.
LightCall & set_green_if_supported(float green)
Set the green property if the light supports RGB.
optional< float > warm_white_
LightCall & set_cold_white(optional< float > cold_white)
Set the cold white value of the light from 0.0 to 1.0.
optional< uint32_t > effect_
LightCall & set_rgb(float red, float green, float blue)
Set the RGB color of the light by RGB values.
LightCall & set_color_brightness_if_supported(float brightness)
Set the color brightness property if the light supports RGBW.
optional< float > color_brightness_
optional< float > cold_white_
LightCall & set_color_mode(optional< ColorMode > color_mode)
Set the color mode of the light.
LightColorValues validate_()
Validate all properties and return the target light color values.
LightCall & set_transition_length(optional< uint32_t > transition_length)
Set the transition length of this call in milliseconds.
LightCall(LightState *parent)
LightCall & set_warm_white_if_supported(float warm_white)
Set the warm white property if the light supports cold white output.
LightCall & from_light_color_values(const LightColorValues &values)
optional< float > brightness_
optional< float > color_temperature_
This class represents the color state for a light object.
ColorMode get_active_color_mode_()
Get the currently targeted, or active if none set, color mode.
ColorMode compute_color_mode_()
LightCall & set_transition_length_if_supported(uint32_t transition_length)
Set the transition length property if the light supports transitions.
LightCall & set_color_temperature_if_supported(float color_temperature)
Set the color_temperature property if the light supports color temperature.
LightCall & set_color_mode_if_supported(ColorMode color_mode)
Set the color mode of the light, if this mode is supported.
This class represents a requested change in a light state.
LightCall & set_state(optional< bool > state)
Set the binary ON/OFF state of the light.
void transform_parameters_()
Some color modes also can be set using non-native parameters, transform those calls.
LightCall & set_warm_white(optional< float > warm_white)
Set the warm white value of the light from 0.0 to 1.0.
LightCall & set_effect(optional< std::string > effect)
Set the effect of the light by its name.
LightCall & set_cold_white_if_supported(float cold_white)
Set the cold white property if the light supports cold white output.
optional< ColorMode > color_mode_
std::set< ColorMode > get_suitable_color_modes_()
Get potential color modes for this light call.
LightCall & set_rgbw(float red, float green, float blue, float white)
Set the RGBW color of the light by RGB values.
optional< uint32_t > flash_length_
LightCall & set_flash_length(optional< uint32_t > flash_length)
Start and set the flash length of this call in milliseconds.
LightCall & set_green(optional< float > green)
Set the green RGB value of the light from 0.0 to 1.0.
Implementation of SPI Controller mode.
optional< uint32_t > transition_length_
LightCall & set_brightness_if_supported(float brightness)
Set the brightness property if the light supports brightness.
LightCall & set_white(optional< float > white)
Set the white value value of the light from 0.0 to 1.0 for RGBW[W] lights.
LightCall & set_brightness(optional< float > brightness)
Set the target brightness of the light from 0.0 (fully off) to 1.0 (fully on)
LightCall & set_blue_if_supported(float blue)
Set the blue property if the light supports RGB.
LightCall & set_white_if_supported(float white)
Set the white property if the light supports RGB.
LightCall & set_blue(optional< float > blue)
Set the blue RGB value of the light from 0.0 to 1.0.
LightCall & set_red_if_supported(float red)
Set the red property if the light supports RGB.