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

#include <automation.h>

Public Member Functions

 Automation (Trigger< Ts... > *trigger)
 
Action< Ts... > * 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 234 of file automation.h.

Member Function Documentation

◆ add_action()

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

Definition at line 236 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 237 of file automation.h.

◆ is_running()

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

Definition at line 243 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 246 of file automation.h.

◆ stop()

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

Definition at line 239 of file automation.h.

◆ trigger()

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

Definition at line 241 of file automation.h.

Field Documentation

◆ actions_

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

Definition at line 250 of file automation.h.

◆ trigger_

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

Definition at line 249 of file automation.h.


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