51 p = p < 0.5f ? p * 2 : (p - 0.5) * 2;
This class represents the color state for a light object.
static LightColorValues lerp(const LightColorValues &start, const LightColorValues &end, float completion)
Linearly interpolate between the values in start to the values in end.
void set_brightness(float brightness)
Set the brightness property of these light color values. In range 0.0 to 1.0.
bool is_on() const
Get the binary true/false state of these light color values.
void set_state(float state)
Set the state of these light color values. In range from 0.0 (off) to 1.0 (on)
ColorMode get_color_mode() const
Get the color mode of these light color values.
virtual std::unique_ptr< LightTransformer > create_default_transition()
Return the default transformer used for transitions.
This class represents the communication layer between the front-end MQTT layer and the hardware outpu...
LightColorValues remote_values
The remote color values reported to the frontend.
LightOutput * get_output() const
Get the light output associated with this object.
uint32_t get_flash_transition_length() const
void publish_state()
Publish the currently active state to the frontend.
LightColorValues current_values
The current values of the light as outputted to the light.
Providing packet encoding functions for exchanging data with a remote host.
uint32_t IRAM_ATTR HOT millis()