ESPHome 2025.9.0-dev
Loading...
Searching...
No Matches
esphome::espnow::OnReceiveTrigger Class Reference

#include <automation.h>

Inheritance diagram for esphome::espnow::OnReceiveTrigger:
esphome::Trigger< const ESPNowRecvInfo &, const uint8_t *, uint8_t > esphome::espnow::ESPNowReceivedPacketHandler

Public Member Functions

 OnReceiveTrigger (std::array< uint8_t, ESP_NOW_ETH_ALEN > address)
 
 OnReceiveTrigger ()
 
bool on_received (const ESPNowRecvInfo &info, const uint8_t *data, uint8_t size) override
 
- Public Member Functions inherited from esphome::Trigger< const ESPNowRecvInfo &, const uint8_t *, uint8_t >
void trigger (Ts... x)
 Inform the parent automation that the event has triggered.
 
void set_automation_parent (Automation< Ts... > *automation_parent)
 
void stop_action ()
 Stop any action connected to this trigger.
 
bool is_action_running ()
 Returns true if any action connected to this trigger is running.
 
- Public Member Functions inherited from esphome::espnow::ESPNowReceivedPacketHandler

Protected Attributes

bool has_address_ {false}
 
const uint8_t * address_ [ESP_NOW_ETH_ALEN]
 
- Protected Attributes inherited from esphome::Trigger< const ESPNowRecvInfo &, const uint8_t *, uint8_t >
Automation< Ts... > * automation_parent_
 

Detailed Description

Definition at line 121 of file automation.h.

Constructor & Destructor Documentation

◆ OnReceiveTrigger() [1/2]

esphome::espnow::OnReceiveTrigger::OnReceiveTrigger ( std::array< uint8_t, ESP_NOW_ETH_ALEN > address)
inlineexplicit

Definition at line 124 of file automation.h.

◆ OnReceiveTrigger() [2/2]

esphome::espnow::OnReceiveTrigger::OnReceiveTrigger ( )
inlineexplicit

Definition at line 128 of file automation.h.

Member Function Documentation

◆ on_received()

bool esphome::espnow::OnReceiveTrigger::on_received ( const ESPNowRecvInfo & info,
const uint8_t * data,
uint8_t size )
inlineoverridevirtual

Implements esphome::espnow::ESPNowReceivedPacketHandler.

Definition at line 130 of file automation.h.

Field Documentation

◆ address_

const uint8_t* esphome::espnow::OnReceiveTrigger::address_[ESP_NOW_ETH_ALEN]
protected

Definition at line 141 of file automation.h.

◆ has_address_

bool esphome::espnow::OnReceiveTrigger::has_address_ {false}
protected

Definition at line 140 of file automation.h.


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