ESPHome 2025.5.0
Loading...
Searching...
No Matches
automation.h
Go to the documentation of this file.
1#pragma once
2
3#include "mixer_speaker.h"
4
5#ifdef USE_ESP32
6
7namespace esphome {
8namespace mixer_speaker {
9template<typename... Ts> class DuckingApplyAction : public Action<Ts...>, public Parented<SourceSpeaker> {
10 TEMPLATABLE_VALUE(uint8_t, decibel_reduction)
11 TEMPLATABLE_VALUE(uint32_t, duration)
12 void play(Ts... x) override {
13 this->parent_->apply_ducking(this->decibel_reduction_.value(x...), this->duration_.value(x...));
14 }
15};
16} // namespace mixer_speaker
17} // namespace esphome
18
19#endif
Helper class to easily give an object a parent of type T.
Definition helpers.h:538
uint8_t duration
Definition msa3xx.h:0
Providing packet encoding functions for exchanging data with a remote host.
Definition a01nyub.cpp:7
uint16_t x
Definition tt21100.cpp:5