ESPHome  2024.11.0
Public Member Functions | Protected Attributes
esphome::Automation< Ts > Class Template Reference

#include <automation.h>

Public Member Functions

 Automation (Trigger< Ts... > *trigger)
 
void add_action (Action< Ts... > *action)
 
void add_actions (const std::vector< Action< Ts... > *> &actions)
 
void stop ()
 
void trigger (Ts... x)
 
bool is_running ()
 
int num_running ()
 Return the number of actions in the action part of this automation that are currently running. More...
 

Protected Attributes

Trigger< Ts... > * trigger_
 
ActionList< Ts... > actions_
 

Detailed Description

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

Definition at line 90 of file automation.h.

Constructor & Destructor Documentation

◆ Automation()

template<typename... Ts>
esphome::Automation< Ts >::Automation ( Trigger< Ts... > *  trigger)
inlineexplicit

Definition at line 236 of file automation.h.

Member Function Documentation

◆ add_action()

template<typename... Ts>
void esphome::Automation< Ts >::add_action ( Action< Ts... > *  action)
inline

Definition at line 238 of file automation.h.

◆ add_actions()

template<typename... Ts>
void esphome::Automation< Ts >::add_actions ( const std::vector< Action< Ts... > *> &  actions)
inline

Definition at line 239 of file automation.h.

◆ is_running()

template<typename... Ts>
bool esphome::Automation< Ts >::is_running ( )
inline

Definition at line 245 of file automation.h.

◆ num_running()

template<typename... Ts>
int esphome::Automation< Ts >::num_running ( )
inline

Return the number of actions in the action part of this automation that are currently running.

Definition at line 248 of file automation.h.

◆ stop()

template<typename... Ts>
void esphome::Automation< Ts >::stop ( )
inline

Definition at line 241 of file automation.h.

◆ trigger()

template<typename... Ts>
void esphome::Automation< Ts >::trigger ( Ts...  x)
inline

Definition at line 243 of file automation.h.

Field Documentation

◆ actions_

template<typename... Ts>
ActionList<Ts...> esphome::Automation< Ts >::actions_
protected

Definition at line 252 of file automation.h.

◆ trigger_

template<typename... Ts>
Trigger<Ts...>* esphome::Automation< Ts >::trigger_
protected

Definition at line 251 of file automation.h.


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