ESPHome 2026.5.0
Loading...
Searching...
No Matches
automation.cpp
Go to the documentation of this file.
1#include "automation.h"
2#include "nfc.h"
3
4namespace esphome::nfc {
5
6void NfcOnTagTrigger::process(const std::unique_ptr<NfcTag> &tag) {
7 char uid_buf[FORMAT_UID_BUFFER_SIZE];
8 this->trigger(std::string(format_uid_to(uid_buf, tag->get_uid())), *tag);
9}
10
11} // namespace esphome::nfc
void trigger(const Ts &...x) ESPHOME_ALWAYS_INLINE
Definition automation.h:482
void process(const std::unique_ptr< NfcTag > &tag)
Definition automation.cpp:6
char * format_uid_to(char *buffer, std::span< const uint8_t > uid)
Format UID to buffer with '-' separator (e.g., "04-11-22-33"). Returns buffer for inline use.
Definition nfc.cpp:10
const char * tag
Definition log.h:74