Update ir_transmitter.h

This commit is contained in:
Djordje 2024-11-14 15:38:57 +01:00
parent b52d3265dc
commit 4503495328

View file

@ -8,12 +8,12 @@ namespace esphome {
namespace midea { namespace midea {
using remote_base::RemoteTransmitterBase; using remote_base::RemoteTransmitterBase;
using remote_base::MideaData; using IrData = remote_base::MideaData;
class IrTransmitter { class IrTransmitter {
public: public:
void set_transmitter(RemoteTransmitterBase *transmitter) { this->transmitter_ = transmitter; } void set_transmitter(RemoteTransmitterBase *transmitter) { this->transmitter_ = transmitter; }
void transmit(MideaData &data) { void transmit(IrData &data) {
data.finalize(); data.finalize();
auto transmit = this->transmitter_->transmit(); auto transmit = this->transmitter_->transmit();
remote_base::MideaProtocol().encode(transmit.get_data(), data); remote_base::MideaProtocol().encode(transmit.get_data(), data);