ESPHome 2025.10.0-dev
Loading...
Searching...
No Matches
esphome::light::AddressableLightEffect Class Referenceabstract

#include <addressable_light_effect.h>

Inheritance diagram for esphome::light::AddressableLightEffect:
esphome::light::LightEffect esphome::adalight::AdalightLightEffect esphome::e131::E131AddressableLightEffect esphome::light::AddressableColorWipeEffect esphome::light::AddressableFireworksEffect esphome::light::AddressableFlickerEffect esphome::light::AddressableLambdaLightEffect esphome::light::AddressableRainbowLightEffect esphome::light::AddressableRandomTwinkleEffect esphome::light::AddressableScanEffect esphome::light::AddressableTwinkleEffect esphome::wled::WLEDLightEffect

Public Member Functions

 AddressableLightEffect (const std::string &name)
 
void start_internal () override
 
void stop () override
 
virtual void apply (AddressableLight &it, const Color &current_color)=0
 
void apply () override
 
uint32_t get_effect_index () const
 Get effect index specifically for addressable effects.
 
bool is_current_effect () const
 Check if this is the currently running addressable effect.
 
- Public Member Functions inherited from esphome::light::LightEffect
 LightEffect (std::string name)
 
virtual void start ()
 Initialize this LightEffect. Will be called once after creation.
 
const std::string & get_name ()
 
virtual void init ()
 Internal method called by the LightState when this light effect is registered in it.
 
void init_internal (LightState *state)
 
uint32_t get_index () const
 Get the index of this effect in the parent light's effect list.
 
bool is_active () const
 Check if this effect is currently active.
 
LightStateget_light_state () const
 Get a reference to the parent light state.
 

Protected Member Functions

AddressableLightget_addressable_ () const
 
- Protected Member Functions inherited from esphome::light::LightEffect
uint32_t get_index_in_parent_ () const
 Internal method to find this effect's index in the parent light's effect list.
 

Additional Inherited Members

- Protected Attributes inherited from esphome::light::LightEffect
LightStatestate_ {nullptr}
 
std::string name_
 

Detailed Description

Definition at line 31 of file addressable_light_effect.h.

Constructor & Destructor Documentation

◆ AddressableLightEffect()

esphome::light::AddressableLightEffect::AddressableLightEffect ( const std::string & name)
inlineexplicit

Definition at line 33 of file addressable_light_effect.h.

Member Function Documentation

◆ apply() [1/2]

void esphome::light::AddressableLightEffect::apply ( )
inlineoverridevirtual

Implements esphome::light::LightEffect.

Definition at line 41 of file addressable_light_effect.h.

◆ apply() [2/2]

◆ get_addressable_()

AddressableLight * esphome::light::AddressableLightEffect::get_addressable_ ( ) const
inlineprotected

Definition at line 55 of file addressable_light_effect.h.

◆ get_effect_index()

uint32_t esphome::light::AddressableLightEffect::get_effect_index ( ) const
inline

Get effect index specifically for addressable effects.

Can be used by effects to modify behavior based on their position in the list.

Definition at line 49 of file addressable_light_effect.h.

◆ is_current_effect()

bool esphome::light::AddressableLightEffect::is_current_effect ( ) const
inline

Check if this is the currently running addressable effect.

Definition at line 52 of file addressable_light_effect.h.

◆ start_internal()

void esphome::light::AddressableLightEffect::start_internal ( )
inlineoverridevirtual

Reimplemented from esphome::light::LightEffect.

Definition at line 34 of file addressable_light_effect.h.

◆ stop()

void esphome::light::AddressableLightEffect::stop ( )
inlineoverridevirtual

The documentation for this class was generated from the following file: