Co-authored-by: Copilot <copilot@github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com> Co-authored-by: J. Nick Koston <nick@koston.org>
27 lines
755 B
C++
27 lines
755 B
C++
#pragma once
|
|
|
|
#include "esphome/core/defines.h"
|
|
|
|
#if defined(USE_ESP32) && defined(USE_SENDSPIN_PLAYER) && defined(USE_SENDSPIN_CONTROLLER)
|
|
|
|
#include "esphome/core/automation.h"
|
|
#include "sendspin_media_source.h"
|
|
|
|
namespace esphome::sendspin_ {
|
|
|
|
template<typename... Ts>
|
|
class EnableStaticDelayAdjustmentAction : public Action<Ts...>, public Parented<SendspinMediaSource> {
|
|
public:
|
|
void play(const Ts &...x) override { this->parent_->set_static_delay_adjustable(true); }
|
|
};
|
|
|
|
template<typename... Ts>
|
|
class DisableStaticDelayAdjustmentAction : public Action<Ts...>, public Parented<SendspinMediaSource> {
|
|
public:
|
|
void play(const Ts &...x) override { this->parent_->set_static_delay_adjustable(false); }
|
|
};
|
|
|
|
} // namespace esphome::sendspin_
|
|
|
|
#endif
|