ESPHome
2025.2.0
esphome
esphome
components
audio_adc
automation.h
Go to the documentation of this file.
1
#pragma once
2
3
#include "
esphome/core/automation.h
"
4
#include "
esphome/core/component.h
"
5
#include "
audio_adc.h
"
6
7
namespace
esphome
{
8
namespace
audio_adc {
9
10
template
<
typename
... Ts>
class
SetMicGainAction
:
public
Action
<Ts...> {
11
public
:
12
explicit
SetMicGainAction
(
AudioAdc
*audio_adc) :
audio_adc_
(audio_adc) {}
13
14
TEMPLATABLE_VALUE
(
float
, mic_gain)
15
16
void
play
(Ts...
x
)
override
{ this->
audio_adc_
->
set_mic_gain
(this->mic_gain_.value(
x
...)); }
17
18
protected
:
19
AudioAdc
*
audio_adc_
;
20
};
21
22
}
// namespace audio_adc
23
}
// namespace esphome
x
uint16_t x
Definition:
tt21100.cpp:17
automation.h
esphome::Action
Definition:
automation.h:121
esphome::audio_adc::SetMicGainAction::audio_adc_
AudioAdc * audio_adc_
Definition:
automation.h:19
esphome::audio_adc::AudioAdc
Definition:
audio_adc.h:9
esphome::audio_adc::SetMicGainAction
Definition:
automation.h:10
esphome::audio_adc::SetMicGainAction::TEMPLATABLE_VALUE
TEMPLATABLE_VALUE(float, mic_gain) void play(Ts... x) override
Definition:
automation.h:14
esphome::audio_adc::SetMicGainAction::SetMicGainAction
SetMicGainAction(AudioAdc *audio_adc)
Definition:
automation.h:12
audio_adc.h
esphome::audio_adc::AudioAdc::set_mic_gain
virtual bool set_mic_gain(float mic_gain)=0
esphome
Implementation of SPI Controller mode.
Definition:
a01nyub.cpp:7
component.h
esphome::Action< Ts... >::play
virtual void play(Ts... x)=0
Generated by
1.8.13