ESPHome  2024.12.2
heatpumpir.h
Go to the documentation of this file.
1 #pragma once
2 
3 #ifdef USE_ARDUINO
4 
6 
7 // Forward-declare HeatpumpIR class from library. We cannot include its header here because it has unnamespaced defines
8 // that conflict with ESPHome.
9 class HeatpumpIR;
10 
11 namespace esphome {
12 namespace heatpumpir {
13 
14 // Simple enum to represent protocols.
15 enum Protocol {
69 };
70 
71 // Simple enum to represent horizontal directios
79 };
80 
81 // Simple enum to represent vertical directions
89 };
90 
91 // Temperature
92 const float TEMP_MIN = 0; // Celsius
93 const float TEMP_MAX = 100; // Celsius
94 
96  public:
98  : climate_ir::ClimateIR(
99  TEMP_MIN, TEMP_MAX, 1.0f, true, true,
102  std::set<climate::ClimateSwingMode>{climate::CLIMATE_SWING_OFF, climate::CLIMATE_SWING_HORIZONTAL,
104  void setup() override;
105  void set_protocol(Protocol protocol) { this->protocol_ = protocol; }
106  void set_horizontal_default(HorizontalDirection horizontal_direction) {
107  this->default_horizontal_direction_ = horizontal_direction;
108  }
109  void set_vertical_default(VerticalDirection vertical_direction) {
110  this->default_vertical_direction_ = vertical_direction;
111  }
112 
115 
116  protected:
117  HeatpumpIR *heatpump_ir_;
119  void transmit_state() override;
123 
126 };
127 
128 } // namespace heatpumpir
129 } // namespace esphome
130 
131 #endif
void set_vertical_default(VerticalDirection vertical_direction)
Definition: heatpumpir.h:109
The fan mode is set to Low.
Definition: climate_mode.h:54
The fan mode is set to Both.
Definition: climate_mode.h:74
void set_min_temperature(float temperature)
Definition: heatpumpir.h:114
STL namespace.
void set_max_temperature(float temperature)
Definition: heatpumpir.h:113
void transmit_state() override
Transmit via IR the state of this climate controller.
Definition: heatpumpir.cpp:94
const float TEMP_MAX
Definition: heatpumpir.h:93
HorizontalDirection default_horizontal_direction_
Definition: heatpumpir.h:121
The fan mode is set to Horizontal.
Definition: climate_mode.h:78
void set_horizontal_default(HorizontalDirection horizontal_direction)
Definition: heatpumpir.h:106
The fan mode is set to Auto.
Definition: climate_mode.h:52
const float TEMP_MIN
Definition: heatpumpir.h:92
ClimateIR(float minimum_temperature, float maximum_temperature, float temperature_step=1.0f, bool supports_dry=false, bool supports_fan_only=false, std::set< climate::ClimateFanMode > fan_modes={}, std::set< climate::ClimateSwingMode > swing_modes={}, std::set< climate::ClimatePreset > presets={})
Definition: climate_ir.h:26
uint16_t temperature
Definition: sun_gtil2.cpp:26
void set_protocol(Protocol protocol)
Definition: heatpumpir.h:105
The fan mode is set to Vertical.
Definition: climate_mode.h:76
VerticalDirection default_vertical_direction_
Definition: heatpumpir.h:122
The fan mode is set to High.
Definition: climate_mode.h:58
The swing mode is set to Off.
Definition: climate_mode.h:72
Implementation of SPI Controller mode.
Definition: a01nyub.cpp:7
The fan mode is set to Medium.
Definition: climate_mode.h:56