ESPHome  2024.4.1
Public Member Functions | Protected Attributes
esphome::light::LightEffect Class Referenceabstract

#include <light_effect.h>

Inheritance diagram for esphome::light::LightEffect:
esphome::light::AddressableLightEffect esphome::light::AutomationLightEffect esphome::light::FlickerLightEffect esphome::light::LambdaLightEffect esphome::light::PulseLightEffect esphome::light::RandomLightEffect esphome::light::StrobeLightEffect 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

 LightEffect (std::string name)
 
virtual void start ()
 Initialize this LightEffect. Will be called once after creation. More...
 
virtual void start_internal ()
 
virtual void stop ()
 Called when this effect is about to be removed. More...
 
virtual void apply ()=0
 Apply this effect. Use the provided state for starting transitions, ... 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

LightStatestate_ {nullptr}
 
std::string name_
 

Detailed Description

Definition at line 12 of file light_effect.h.

Constructor & Destructor Documentation

◆ LightEffect()

esphome::light::LightEffect::LightEffect ( std::string  name)
inlineexplicit

Definition at line 14 of file light_effect.h.

Member Function Documentation

◆ apply()

virtual void esphome::light::LightEffect::apply ( )
pure virtual

◆ get_name()

const std::string& esphome::light::LightEffect::get_name ( )
inline

Definition at line 27 of file light_effect.h.

◆ init()

virtual void esphome::light::LightEffect::init ( )
inlinevirtual

Internal method called by the LightState when this light effect is registered in it.

Definition at line 30 of file light_effect.h.

◆ init_internal()

void esphome::light::LightEffect::init_internal ( LightState state)
inline

Definition at line 32 of file light_effect.h.

◆ start()

virtual void esphome::light::LightEffect::start ( )
inlinevirtual

◆ start_internal()

virtual void esphome::light::LightEffect::start_internal ( )
inlinevirtual

Reimplemented in esphome::light::AddressableLightEffect.

Definition at line 19 of file light_effect.h.

◆ stop()

virtual void esphome::light::LightEffect::stop ( )
inlinevirtual

Field Documentation

◆ name_

std::string esphome::light::LightEffect::name_
protected

Definition at line 39 of file light_effect.h.

◆ state_

LightState* esphome::light::LightEffect::state_ {nullptr}
protected

Definition at line 38 of file light_effect.h.


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