|
ESPHome 2025.12.0-dev
|
#include <base_light_effects.h>
Public Member Functions | |
| LambdaLightEffect (const char *name, void(*f)(bool initial_run), uint32_t update_interval) | |
| void | start () override |
| void | apply () override |
| uint32_t | get_current_index () const |
| Get the current effect index for use in lambda functions. | |
Public Member Functions inherited from esphome::light::LightEffect | |
| LightEffect (const char *name) | |
| virtual void | start_internal () |
| virtual void | stop () |
| Called when this effect is about to be removed. | |
| const char * | get_name () const |
| Returns the name of this effect. | |
| 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 | |
| void(* | f_ )(bool initial_run) |
| uint32_t | update_interval_ |
| uint32_t | last_run_ {0} |
| bool | initial_run_ |
Protected Attributes inherited from esphome::light::LightEffect | |
| LightState * | state_ {nullptr} |
| const char * | name_ |
Additional Inherited Members | |
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. | |
Definition at line 113 of file base_light_effects.h.
|
inline |
Definition at line 115 of file base_light_effects.h.
|
inlineoverridevirtual |
Implements esphome::light::LightEffect.
Definition at line 119 of file base_light_effects.h.
|
inline |
Get the current effect index for use in lambda functions.
This can be useful for lambda effects that need to know their own index.
Definition at line 130 of file base_light_effects.h.
|
inlineoverridevirtual |
Reimplemented from esphome::light::LightEffect.
Definition at line 118 of file base_light_effects.h.
|
protected |
Definition at line 133 of file base_light_effects.h.
|
protected |
Definition at line 136 of file base_light_effects.h.
|
protected |
Definition at line 135 of file base_light_effects.h.
|
protected |
Definition at line 134 of file base_light_effects.h.