1
0
mirror of https://github.com/esphome/esphome.git synced 2025-11-19 08:15:49 +00:00
Files
esphome/esphome/components/remote_transmitter/automation.h
2025-11-05 01:23:24 +00:00

19 lines
566 B
C++

#pragma once
#include "esphome/components/remote_transmitter/remote_transmitter.h"
#include "esphome/core/automation.h"
#include "esphome/core/component.h"
#include "esphome/core/helpers.h"
namespace esphome {
namespace remote_transmitter {
template<typename... Ts> class DigitalWriteAction : public Action<Ts...>, public Parented<RemoteTransmitterComponent> {
public:
TEMPLATABLE_VALUE(bool, value)
void play(const Ts &...x) override { this->parent_->digital_write(this->value_.value(x...)); }
};
} // namespace remote_transmitter
} // namespace esphome