ESPHome  2025.3.3
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 {
70 };
71 
72 // Simple enum to represent horizontal directios
80 };
81 
82 // Simple enum to represent vertical directions
90 };
91 
92 // Temperature
93 const float TEMP_MIN = 0; // Celsius
94 const float TEMP_MAX = 100; // Celsius
95 
97  public:
99  : climate_ir::ClimateIR(
100  TEMP_MIN, TEMP_MAX, 1.0f, true, true,
103  std::set<climate::ClimateSwingMode>{climate::CLIMATE_SWING_OFF, climate::CLIMATE_SWING_HORIZONTAL,
105  void setup() override;
106  void set_protocol(Protocol protocol) { this->protocol_ = protocol; }
107  void set_horizontal_default(HorizontalDirection horizontal_direction) {
108  this->default_horizontal_direction_ = horizontal_direction;
109  }
110  void set_vertical_default(VerticalDirection vertical_direction) {
111  this->default_vertical_direction_ = vertical_direction;
112  }
113 
116 
117  protected:
118  HeatpumpIR *heatpump_ir_;
120  void transmit_state() override;
124 
127 };
128 
129 } // namespace heatpumpir
130 } // namespace esphome
131 
132 #endif
void set_vertical_default(VerticalDirection vertical_direction)
Definition: heatpumpir.h:110
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:115
STL namespace.
void set_max_temperature(float temperature)
Definition: heatpumpir.h:114
void transmit_state() override
Transmit via IR the state of this climate controller.
Definition: heatpumpir.cpp:96
const float TEMP_MAX
Definition: heatpumpir.h:94
HorizontalDirection default_horizontal_direction_
Definition: heatpumpir.h:122
The fan mode is set to Horizontal.
Definition: climate_mode.h:78
void set_horizontal_default(HorizontalDirection horizontal_direction)
Definition: heatpumpir.h:107
The fan mode is set to Auto.
Definition: climate_mode.h:52
const float TEMP_MIN
Definition: heatpumpir.h:93
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:106
The fan mode is set to Vertical.
Definition: climate_mode.h:76
VerticalDirection default_vertical_direction_
Definition: heatpumpir.h:123
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