ESPHome 2025.10.0-dev
|
#include <base_light_effects.h>
Public Member Functions | |
AutomationLightEffect (const std::string &name) | |
void | stop () override |
void | apply () override |
Trigger * | get_trig () const |
uint32_t | get_current_index () const |
Get the current effect index for use in automations. | |
![]() | |
LightEffect (std::string name) | |
virtual void | start () |
Initialize this LightEffect. Will be called once after creation. | |
virtual void | start_internal () |
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. | |
LightState * | get_light_state () const |
Get a reference to the parent light state. | |
Protected Attributes | |
Trigger * | trig_ {new Trigger<>} |
![]() | |
LightState * | state_ {nullptr} |
std::string | name_ |
Additional Inherited Members | |
![]() | |
uint32_t | get_index_in_parent_ () const |
Internal method to find this effect's index in the parent light's effect list. | |
Definition at line 139 of file base_light_effects.h.
|
inline |
Definition at line 141 of file base_light_effects.h.
|
inlineoverridevirtual |
Implements esphome::light::LightEffect.
Definition at line 143 of file base_light_effects.h.
|
inline |
Get the current effect index for use in automations.
Useful for automations that need to know which effect is running.
Definition at line 152 of file base_light_effects.h.
|
inline |
Definition at line 148 of file base_light_effects.h.
|
inlineoverridevirtual |
Reimplemented from esphome::light::LightEffect.
Definition at line 142 of file base_light_effects.h.
Definition at line 155 of file base_light_effects.h.