ESPHome 2026.11.0-dev
Loading...
Searching...
No Matches
esphome::WhileAction< Ts > Class Template Reference

#include <base_automation.h>

Inheritance diagram for esphome::WhileAction< Ts >:
esphome::Action< Ts... >

Public Member Functions

 WhileAction (Condition< Ts... > *condition)
 
void add_then (const std::initializer_list< Action< Ts... > * > &actions)
 
void add_then_action (Action< Ts... > *action)
 
void finish_then ()
 
void play_complex (const Ts &...x) final
 
void play (const Ts &...x) override
 
void stop () override
 
- Public Member Functions inherited from esphome::Action< Ts... >
void stop_complex ()
 
bool is_running ()
 Check if this or any of the following actions are currently running.
 
int num_running_total ()
 The total number of actions that are currently running in this plus any of the following actions in the chain.
 

Protected Attributes

Condition< Ts... > * condition_
 
ActionList< Ts... > then_
 
- Protected Attributes inherited from esphome::Action< Ts... >
friend ActionList< Ts... >
 
Action< Ts... > * next_
 
int num_running_
 The number of instances of this sequence in the list of actions that is currently being executed.
 

Additional Inherited Members

- Protected Member Functions inherited from esphome::Action< Ts... >
void play_next_ (const Ts &...x)
 
void play_next_tuple_ (const std::tuple< Ts... > &tuple, std::index_sequence< S... >)
 
void play_next_tuple_ (const std::tuple< Ts... > &tuple)
 
void stop_next_ ()
 
bool is_running_next_ ()
 
bool next_is_owner_ () const
 
Action * owner_ () const
 Only valid when next_is_owner_().
 
Action * chain_next_ () const
 
- Static Protected Member Functions inherited from esphome::Action< Ts... >
static Action * tag_owner (Action *owner)
 
- Static Protected Attributes inherited from esphome::Action< Ts... >
static constexpr uintptr_t OWNER_TAG
 

Detailed Description

template<typename... Ts>
class esphome::WhileAction< Ts >

Definition at line 352 of file base_automation.h.

Constructor & Destructor Documentation

◆ WhileAction()

template<typename... Ts>
esphome::WhileAction< Ts >::WhileAction ( Condition< Ts... > * condition)
inline

Definition at line 354 of file base_automation.h.

Member Function Documentation

◆ add_then()

template<typename... Ts>
void esphome::WhileAction< Ts >::add_then ( const std::initializer_list< Action< Ts... > * > & actions)
inline

Definition at line 358 of file base_automation.h.

◆ add_then_action()

template<typename... Ts>
void esphome::WhileAction< Ts >::add_then_action ( Action< Ts... > * action)
inline

Definition at line 362 of file base_automation.h.

◆ finish_then()

template<typename... Ts>
void esphome::WhileAction< Ts >::finish_then ( )
inline

Definition at line 363 of file base_automation.h.

◆ play()

template<typename... Ts>
void esphome::WhileAction< Ts >::play ( const Ts &... x)
inlineoverridevirtual

Implements esphome::Action< Ts... >.

Definition at line 387 of file base_automation.h.

◆ play_complex()

template<typename... Ts>
void esphome::WhileAction< Ts >::play_complex ( const Ts &... x)
inlinefinalvirtual

Reimplemented from esphome::Action< Ts... >.

Definition at line 365 of file base_automation.h.

◆ stop()

template<typename... Ts>
void esphome::WhileAction< Ts >::stop ( )
inlineoverridevirtual

Reimplemented from esphome::Action< Ts... >.

Definition at line 396 of file base_automation.h.

Field Documentation

◆ condition_

template<typename... Ts>
Condition<Ts...>* esphome::WhileAction< Ts >::condition_
protected

Definition at line 399 of file base_automation.h.

◆ then_

template<typename... Ts>
ActionList<Ts...> esphome::WhileAction< Ts >::then_
protected

Definition at line 400 of file base_automation.h.


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