ESPHome  2024.6.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)

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 ( )

Definition at line 27 of file light_effect.h.

◆ init()

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

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)

Definition at line 32 of file light_effect.h.

◆ start()

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

◆ start_internal()

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

Reimplemented in esphome::light::AddressableLightEffect.

Definition at line 19 of file light_effect.h.

◆ stop()

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

Field Documentation

◆ name_

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

Definition at line 39 of file light_effect.h.

◆ state_

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

Definition at line 38 of file light_effect.h.

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