ESPHome
2026.10.2
Loading...
Searching...
No Matches
esphome
components
microphone
automation.h
Go to the documentation of this file.
1
#pragma once
2
3
#include "
esphome/core/automation.h
"
4
#include "
microphone.h
"
5
6
#include <vector>
7
8
namespace
esphome::microphone
{
9
10
class
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
esphome::Trigger
Definition
automation.h:523
esphome::Trigger< const std::vector< uint8_t > & >::trigger
void trigger(const Ts &...x) ESPHOME_ALWAYS_INLINE
Definition
automation.h:528
esphome::microphone::DataTrigger
Definition
automation.h:10
esphome::microphone::DataTrigger::DataTrigger
DataTrigger(Microphone *mic)
Definition
automation.h:12
esphome::microphone::Microphone
Definition
microphone.h:19
esphome::microphone::Microphone::add_data_callback
void add_data_callback(F &&data_callback)
Definition
microphone.h:23
automation.h
microphone.h
esphome::microphone
Definition
automation.h:8
Generated by
1.12.0