mirror of
https://github.com/GrKoR/esphome_aux_ac_component.git
synced 2025-12-06 11:36:55 +03:00
35 lines
773 B
C++
35 lines
773 B
C++
#pragma once
|
|
|
|
#include "esphome/core/component.h"
|
|
#include "esphome/core/automation.h"
|
|
#include "aux_ac.h"
|
|
|
|
namespace esphome {
|
|
namespace aux_ac {
|
|
|
|
template <typename... Ts>
|
|
class AirConDisplayOffAction : public Action<Ts...>
|
|
{
|
|
public:
|
|
explicit AirConDisplayOffAction(AirCon *ac) : ac_(ac) {}
|
|
|
|
void play(Ts... x) override { this->ac_->displayOffSequence(); }
|
|
|
|
protected:
|
|
AirCon *ac_;
|
|
};
|
|
|
|
template <typename... Ts>
|
|
class AirConDisplayOnAction : public Action<Ts...>
|
|
{
|
|
public:
|
|
explicit AirConDisplayOnAction(AirCon *ac) : ac_(ac) {}
|
|
|
|
void play(Ts... x) override { this->ac_->displayOnSequence(); }
|
|
|
|
protected:
|
|
AirCon *ac_;
|
|
};
|
|
|
|
} // namespace aux_ac
|
|
} // namespace esphome
|