ESPHome 2026.11.0-dev
Loading...
Searching...
No Matches
esphome::light::StrobeLightEffect Class Reference

#include <base_light_effects.h>

Inheritance diagram for esphome::light::StrobeLightEffect:
esphome::light::LightEffect

Public Member Functions

 StrobeLightEffect (const char *name)
 
void start () override
 
void apply () override
 
void set_colors (const StrobeLightEffectColor *colors, size_t count)
 Codegen only: point at the generated flash table of steps, which must outlive the effect.
 
- 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.
 
StringRef 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 Member Functions

uint32_t duration_ (size_t index) const
 
- 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.
 

Protected Attributes

ConstVector< StrobeLightEffectColor > colors_
 
uint32_t last_switch_ {0}
 
size_t at_color_ {0}
 
- Protected Attributes inherited from esphome::light::LightEffect
LightState * state_ {nullptr}
 
const char * name_
 

Detailed Description

Definition at line 179 of file base_light_effects.h.

Constructor & Destructor Documentation

◆ StrobeLightEffect()

esphome::light::StrobeLightEffect::StrobeLightEffect ( const char * name)
inlineexplicit

Definition at line 181 of file base_light_effects.h.

Member Function Documentation

◆ apply()

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

Implements esphome::light::LightEffect.

Definition at line 187 of file base_light_effects.h.

◆ duration_()

uint32_t esphome::light::StrobeLightEffect::duration_ ( size_t index) const
inlineprotected

Definition at line 218 of file base_light_effects.h.

◆ set_colors()

void esphome::light::StrobeLightEffect::set_colors ( const StrobeLightEffectColor * colors,
size_t count )
inline

Codegen only: point at the generated flash table of steps, which must outlive the effect.

Definition at line 215 of file base_light_effects.h.

◆ start()

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

Reimplemented from esphome::light::LightEffect.

Definition at line 182 of file base_light_effects.h.

Field Documentation

◆ at_color_

size_t esphome::light::StrobeLightEffect::at_color_ {0}
protected

Definition at line 226 of file base_light_effects.h.

◆ colors_

ConstVector<StrobeLightEffectColor> esphome::light::StrobeLightEffect::colors_
protected

Definition at line 224 of file base_light_effects.h.

◆ last_switch_

uint32_t esphome::light::StrobeLightEffect::last_switch_ {0}
protected

Definition at line 225 of file base_light_effects.h.


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