13#ifdef USE_POWER_SUPPLY
20using ESPColor
ESPDEPRECATED(
"esphome::light::ESPColor is deprecated, use esphome::Color instead.",
"v1.21") = Color;
33 virtual int32_t
size()
const = 0;
50 if (amnt > this->
size())
59 if (amnt > this->
size())
67 void set_correction(
float red,
float green,
float blue,
float white = 1.0f) {
69 Color(to_uint8_scale(red), to_uint8_scale(green), to_uint8_scale(blue), to_uint8_scale(white)));
78#ifdef USE_POWER_SUPPLY
88#ifdef USE_POWER_SUPPLY
89 for (
const auto &c : *
this) {
90 if (c.get_red_raw() > 0 || c.get_green_raw() > 0 || c.get_blue_raw() > 0 || c.get_white_raw() > 0) {
102#ifdef USE_POWER_SUPPLY
112 void start()
override;
virtual void clear_effect_data()=0
void shift_left(int32_t amnt)
virtual ESPColorView get_view_internal(int32_t index) const =0
void set_power_supply(power_supply::PowerSupply *power_supply)
void setup_state(LightState *state) override
LightState * state_parent_
ESPColorView get(int32_t index)
power_supply::PowerSupplyRequester power_
void shift_right(int32_t amnt)
ESPColorView operator[](int32_t index) const
void set_effect_active(bool effect_active)
virtual int32_t size() const =0
void call_setup() override
bool is_effect_active() const
void update_state(LightState *state) override
void set_correction(float red, float green, float blue, float white=1.0f)
ESPRangeView range(int32_t from, int32_t to)
std::unique_ptr< LightTransformer > create_default_transition() override
ESPColorCorrection correction_
Use a custom state class for addressable lights, to allow type system to discriminate between address...
void set_max_brightness(const Color &max_brightness)
void calculate_gamma_table(float gamma)
A half-open range of LEDs, inclusive of the begin index and exclusive of the end index,...
Interface to write LightStates to hardware.
This class represents the communication layer between the front-end MQTT layer and the hardware outpu...
LightState(LightOutput *output)
float get_gamma_correct() const
bool next_write_
Whether the light value should be written in the next cycle.
void set_parent(PowerSupply *parent)
Color color_from_light_color_values(LightColorValues val)
Convert the color information from a LightColorValues object to a Color object (does not apply bright...
int32_t HOT interpret_index(int32_t index, int32_t size)
Providing packet encoding functions for exchanging data with a remote host.
ESPDEPRECATED("Use Color::BLACK instead of COLOR_BLACK", "v1.21") extern const Color COLOR_BLACK