ESPHome  2024.10.2
Public Member Functions | Protected Attributes
esphome::light::LambdaLightEffect Class Reference

#include <base_light_effects.h>

Inheritance diagram for esphome::light::LambdaLightEffect:
esphome::light::LightEffect

Public Member Functions

 LambdaLightEffect (const std::string &name, std::function< void(bool initial_run)> f, uint32_t update_interval)
 
void start () override
 
void apply () override
 
- Public Member Functions inherited from esphome::light::LightEffect
 LightEffect (std::string name)
 
virtual void start_internal ()
 
virtual void stop ()
 Called when this effect is about to be removed. More...
 
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(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_
 

Detailed Description

Definition at line 113 of file base_light_effects.h.

Constructor & Destructor Documentation

◆ LambdaLightEffect()

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

Definition at line 115 of file base_light_effects.h.

Member Function Documentation

◆ apply()

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

Implements esphome::light::LightEffect.

Definition at line 119 of file base_light_effects.h.

◆ start()

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

Reimplemented from esphome::light::LightEffect.

Definition at line 118 of file base_light_effects.h.

Field Documentation

◆ f_

std::function<void(bool initial_run)> esphome::light::LambdaLightEffect::f_
protected

Definition at line 129 of file base_light_effects.h.

◆ initial_run_

bool esphome::light::LambdaLightEffect::initial_run_
protected

Definition at line 132 of file base_light_effects.h.

◆ last_run_

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

Definition at line 131 of file base_light_effects.h.

◆ update_interval_

uint32_t esphome::light::LambdaLightEffect::update_interval_
protected

Definition at line 130 of file base_light_effects.h.


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