ESPHome  2024.11.0
Public Member Functions | Protected Member Functions
esphome::Condition< Ts > Class Template Referenceabstract

Base class for all automation conditions. More...

#include <automation.h>

Public Member Functions

virtual bool check (Ts... x)=0
 Check whether this condition passes. This condition check must be instant, and not cause any delays. More...
 
bool check_tuple (const std::tuple< Ts... > &tuple)
 Call check with a tuple of values as parameter. More...
 

Protected Member Functions

template<int... S>
bool check_tuple_ (const std::tuple< Ts... > &tuple, seq< S... >)
 

Detailed Description

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

Base class for all automation conditions.

Template Parameters
TsThe template parameters to pass when executing.

Definition at line 74 of file automation.h.

Member Function Documentation

◆ check()

template<typename... Ts>
virtual bool esphome::Condition< Ts >::check ( Ts...  x)
pure virtual

Check whether this condition passes. This condition check must be instant, and not cause any delays.

Implemented in esphome::display::DisplayIsDisplayingPageCondition< Ts >, esphome::wifi::WiFiEnabledCondition< Ts >, esphome::wifi::WiFiConnectedCondition< Ts >, esphome::mqtt::MQTTConnectedCondition< Ts >, esphome::voice_assistant::ConnectedCondition< Ts >, esphome::voice_assistant::IsRunningCondition< Ts >, esphome::lvgl::LvglCondition< Ts >, esphome::script::IsRunningCondition< C, Ts >, esphome::alarm_control_panel::AlarmControlPanelCondition< Ts >, esphome::dfplayer::DFPlayerIsPlayingCondition< Ts >, esphome::micro_wake_word::IsRunningCondition< Ts >, esphome::wireguard::WireguardEnabledCondition< Ts >, esphome::api::APIConnectedCondition< Ts >, esphome::wireguard::WireguardPeerOnlineCondition< Ts >, esphome::pn532::PN532IsWritingCondition< Ts >, esphome::esp32_ble::BLEEnabledCondition< Ts >, esphome::binary_sensor::BinarySensorCondition< Ts >, esphome::rtttl::IsPlayingCondition< Ts >, esphome::light::LightIsOffCondition< Ts >, esphome::sun::SunCondition< Ts >, esphome::light::LightIsOnCondition< Ts >, esphome::fan::FanIsOffCondition< Ts >, esphome::cover::CoverIsClosedCondition< Ts >, esphome::fan::FanIsOnCondition< Ts >, esphome::valve::ValveIsClosedCondition< Ts >, esphome::cover::CoverIsOpenCondition< Ts >, esphome::sensor::SensorInRangeCondition< Ts >, esphome::ForCondition< Ts >, esphome::display_menu_base::IsActiveCondition< Ts >, esphome::valve::ValveIsOpenCondition< Ts >, esphome::speaker::IsStoppedCondition< Ts >, esphome::media_player::IsAnnouncingCondition< Ts >, esphome::number::NumberInRangeCondition< Ts >, esphome::speaker::IsPlayingCondition< Ts >, esphome::media_player::IsPausedCondition< Ts >, esphome::LambdaCondition< Ts >, esphome::duty_time_sensor::RunningCondition< Ts >, esphome::media_player::IsPlayingCondition< Ts >, esphome::media_player::IsIdleCondition< Ts >, esphome::time::TimeHasTimeCondition< Ts >, esphome::XorCondition< Ts >, esphome::NotCondition< Ts >, esphome::lock::LockCondition< Ts >, esphome::switch_::SwitchCondition< Ts >, esphome::OrCondition< Ts >, esphome::microphone::IsCapturingCondition< Ts >, esphome::pn7150::PN7150IsWritingCondition< Ts >, esphome::pn7160::PN7160IsWritingCondition< Ts >, esphome::update::IsAvailableCondition< Ts >, and esphome::AndCondition< Ts >.

◆ check_tuple()

template<typename... Ts>
bool esphome::Condition< Ts >::check_tuple ( const std::tuple< Ts... > &  tuple)
inline

Call check with a tuple of values as parameter.

Definition at line 80 of file automation.h.

◆ check_tuple_()

template<typename... Ts>
template<int... S>
bool esphome::Condition< Ts >::check_tuple_ ( const std::tuple< Ts... > &  tuple,
seq< S... >   
)
inlineprotected

Definition at line 85 of file automation.h.


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