ESPHome 2026.10.2
Loading...
Searching...
No Matches
automation.h
Go to the documentation of this file.
1#pragma once
2
4#include "microphone.h"
5
6#include <vector>
7
9
10class DataTrigger final : public Trigger<const std::vector<uint8_t> &> {
11 public:
12 explicit DataTrigger(Microphone *mic) {
13 mic->add_data_callback([this](const std::vector<uint8_t> &data) { this->trigger(data); });
14 }
15};
16
17} // namespace esphome::microphone
void trigger(const Ts &...x) ESPHOME_ALWAYS_INLINE
Definition automation.h:528
void add_data_callback(F &&data_callback)
Definition microphone.h:23