ESPHome  2024.4.1
Public Member Functions | Protected Attributes
esphome::light::PulseLightEffect Class Reference

Pulse effect. More...

#include <base_light_effects.h>

Inheritance diagram for esphome::light::PulseLightEffect:
esphome::light::LightEffect

Public Member Functions

 PulseLightEffect (const std::string &name)
 
void apply () override
 
void set_transition_on_length (uint32_t transition_length)
 
void set_transition_off_length (uint32_t transition_length)
 
void set_update_interval (uint32_t update_interval)
 
void set_min_max_brightness (float min, float max)
 
- Public Member Functions inherited from esphome::light::LightEffect
 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...
 
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

bool on_ = false
 
uint32_t last_color_change_ {0}
 
uint32_t transition_on_length_ {}
 
uint32_t transition_off_length_ {}
 
uint32_t update_interval_ {}
 
float min_brightness {0.0}
 
float max_brightness {1.0}
 
- Protected Attributes inherited from esphome::light::LightEffect
LightStatestate_ {nullptr}
 
std::string name_
 

Detailed Description

Pulse effect.

Definition at line 18 of file base_light_effects.h.

Constructor & Destructor Documentation

◆ PulseLightEffect()

esphome::light::PulseLightEffect::PulseLightEffect ( const std::string &  name)
inlineexplicit

Definition at line 20 of file base_light_effects.h.

Member Function Documentation

◆ apply()

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

Implements esphome::light::LightEffect.

Definition at line 22 of file base_light_effects.h.

◆ set_min_max_brightness()

void esphome::light::PulseLightEffect::set_min_max_brightness ( float  min,
float  max 
)
inline

Definition at line 45 of file base_light_effects.h.

◆ set_transition_off_length()

void esphome::light::PulseLightEffect::set_transition_off_length ( uint32_t  transition_length)
inline

Definition at line 41 of file base_light_effects.h.

◆ set_transition_on_length()

void esphome::light::PulseLightEffect::set_transition_on_length ( uint32_t  transition_length)
inline

Definition at line 40 of file base_light_effects.h.

◆ set_update_interval()

void esphome::light::PulseLightEffect::set_update_interval ( uint32_t  update_interval)
inline

Definition at line 43 of file base_light_effects.h.

Field Documentation

◆ last_color_change_

uint32_t esphome::light::PulseLightEffect::last_color_change_ {0}
protected

Definition at line 52 of file base_light_effects.h.

◆ max_brightness

float esphome::light::PulseLightEffect::max_brightness {1.0}
protected

Definition at line 57 of file base_light_effects.h.

◆ min_brightness

float esphome::light::PulseLightEffect::min_brightness {0.0}
protected

Definition at line 56 of file base_light_effects.h.

◆ on_

bool esphome::light::PulseLightEffect::on_ = false
protected

Definition at line 51 of file base_light_effects.h.

◆ transition_off_length_

uint32_t esphome::light::PulseLightEffect::transition_off_length_ {}
protected

Definition at line 54 of file base_light_effects.h.

◆ transition_on_length_

uint32_t esphome::light::PulseLightEffect::transition_on_length_ {}
protected

Definition at line 53 of file base_light_effects.h.

◆ update_interval_

uint32_t esphome::light::PulseLightEffect::update_interval_ {}
protected

Definition at line 55 of file base_light_effects.h.


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