ESPHome 2026.2.1
Loading...
Searching...
No Matches
automation.cpp
Go to the documentation of this file.
1#include "automation.h"
2#include "nfc.h"
3
4namespace esphome {
5namespace nfc {
6
7void NfcOnTagTrigger::process(const std::unique_ptr<NfcTag> &tag) {
8 char uid_buf[FORMAT_UID_BUFFER_SIZE];
9 this->trigger(std::string(format_uid_to(uid_buf, tag->get_uid())), *tag);
10}
11
12} // namespace nfc
13} // namespace esphome
void process(const std::unique_ptr< NfcTag > &tag)
Definition automation.cpp:7
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:11
Providing packet encoding functions for exchanging data with a remote host.
Definition a01nyub.cpp:7