ESPHome 2025.5.0
Loading...
Searching...
No Matches
automation.h
Go to the documentation of this file.
1#pragma once
2
4#include "sml.h"
5
6#include <vector>
7
8namespace esphome {
9namespace sml {
10
11class DataTrigger : public Trigger<const std::vector<uint8_t> &, bool> {
12 public:
13 explicit DataTrigger(Sml *sml) {
14 sml->add_on_data_callback([this](const std::vector<uint8_t> &data, bool valid) { this->trigger(data, valid); });
15 }
16};
17
18} // namespace sml
19} // namespace esphome
void add_on_data_callback(std::function< void(std::vector< uint8_t >, bool)> &&callback)
Definition sml.cpp:64
Providing packet encoding functions for exchanging data with a remote host.
Definition a01nyub.cpp:7