ESPHome  2024.11.0
Public Member Functions | Protected Attributes
esphome::binary_sensor::ClickTrigger Class Reference

#include <automation.h>

Inheritance diagram for esphome::binary_sensor::ClickTrigger:
esphome::Trigger<>

Public Member Functions

 ClickTrigger (BinarySensor *parent, uint32_t min_length, uint32_t max_length)
 
- Public Member Functions inherited from esphome::Trigger<>
void trigger (Ts... x)
 Inform the parent automation that the event has triggered. More...
 
void set_automation_parent (Automation< Ts... > *automation_parent)
 
void stop_action ()
 Stop any action connected to this trigger. More...
 
bool is_action_running ()
 Returns true if any action connected to this trigger is running. More...
 

Protected Attributes

uint32_t start_time_ {0}
 
uint32_t min_length_
 The millis() time when the click started. More...
 
uint32_t max_length_
 Minimum length of click. 0 means no minimum. More...
 
- Protected Attributes inherited from esphome::Trigger<>
Automation< Ts... > * automation_parent_
 

Detailed Description

Definition at line 43 of file automation.h.

Constructor & Destructor Documentation

◆ ClickTrigger()

esphome::binary_sensor::ClickTrigger::ClickTrigger ( BinarySensor parent,
uint32_t  min_length,
uint32_t  max_length 
)
inlineexplicit

Definition at line 45 of file automation.h.

Field Documentation

◆ max_length_

uint32_t esphome::binary_sensor::ClickTrigger::max_length_
protected

Minimum length of click. 0 means no minimum.

Definition at line 61 of file automation.h.

◆ min_length_

uint32_t esphome::binary_sensor::ClickTrigger::min_length_
protected

The millis() time when the click started.

Definition at line 60 of file automation.h.

◆ start_time_

uint32_t esphome::binary_sensor::ClickTrigger::start_time_ {0}
protected

Definition at line 59 of file automation.h.


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