ESPHome  2024.11.1
Public Member Functions | Protected Attributes
esphome::light::AddressableLambdaLightEffect Class Reference

#include <addressable_light_effect.h>

Inheritance diagram for esphome::light::AddressableLambdaLightEffect:
esphome::light::AddressableLightEffect esphome::light::LightEffect

Public Member Functions

 AddressableLambdaLightEffect (const std::string &name, std::function< void(AddressableLight &, Color, bool initial_run)> f, uint32_t update_interval)
 
void start () override
 
void apply (AddressableLight &it, const Color &current_color) override
 
- Public Member Functions inherited from esphome::light::AddressableLightEffect
 AddressableLightEffect (const std::string &name)
 
void start_internal () override
 
void stop () override
 
void apply () override
 
- Public Member Functions inherited from esphome::light::LightEffect
 LightEffect (std::string name)
 
const std::string & get_name ()
 
virtual void init ()
 Internal method called by the LightState when this light effect is registered in it. More...
 
void init_internal (LightState *state)
 

Protected Attributes

std::function< void(AddressableLight &, Color, bool initial_run)> f_
 
uint32_t update_interval_
 
uint32_t last_run_ {0}
 
bool initial_run_
 
- Protected Attributes inherited from esphome::light::LightEffect
LightStatestate_ {nullptr}
 
std::string name_
 

Additional Inherited Members

- Protected Member Functions inherited from esphome::light::AddressableLightEffect
AddressableLightget_addressable_ () const
 

Detailed Description

Definition at line 51 of file addressable_light_effect.h.

Constructor & Destructor Documentation

◆ AddressableLambdaLightEffect()

esphome::light::AddressableLambdaLightEffect::AddressableLambdaLightEffect ( const std::string &  name,
std::function< void(AddressableLight &, Color, bool initial_run)>  f,
uint32_t  update_interval 
)
inline

Definition at line 53 of file addressable_light_effect.h.

Member Function Documentation

◆ apply()

void esphome::light::AddressableLambdaLightEffect::apply ( AddressableLight it,
const Color current_color 
)
inlineoverridevirtual

Implements esphome::light::AddressableLightEffect.

Definition at line 58 of file addressable_light_effect.h.

◆ start()

void esphome::light::AddressableLambdaLightEffect::start ( )
inlineoverridevirtual

Reimplemented from esphome::light::LightEffect.

Definition at line 57 of file addressable_light_effect.h.

Field Documentation

◆ f_

std::function<void(AddressableLight &, Color, bool initial_run)> esphome::light::AddressableLambdaLightEffect::f_
protected

Definition at line 69 of file addressable_light_effect.h.

◆ initial_run_

bool esphome::light::AddressableLambdaLightEffect::initial_run_
protected

Definition at line 72 of file addressable_light_effect.h.

◆ last_run_

uint32_t esphome::light::AddressableLambdaLightEffect::last_run_ {0}
protected

Definition at line 71 of file addressable_light_effect.h.

◆ update_interval_

uint32_t esphome::light::AddressableLambdaLightEffect::update_interval_
protected

Definition at line 70 of file addressable_light_effect.h.


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