ESPHome  2024.5.5
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 {
58 };
59 
60 // Simple enum to represent horizontal directios
68 };
69 
70 // Simple enum to represent vertical directions
78 };
79 
80 // Temperature
81 const float TEMP_MIN = 0; // Celsius
82 const float TEMP_MAX = 100; // Celsius
83 
85  public:
87  : climate_ir::ClimateIR(
88  TEMP_MIN, TEMP_MAX, 1.0f, true, true,
91  std::set<climate::ClimateSwingMode>{climate::CLIMATE_SWING_OFF, climate::CLIMATE_SWING_HORIZONTAL,
93  void setup() override;
94  void set_protocol(Protocol protocol) { this->protocol_ = protocol; }
95  void set_horizontal_default(HorizontalDirection horizontal_direction) {
96  this->default_horizontal_direction_ = horizontal_direction;
97  }
98  void set_vertical_default(VerticalDirection vertical_direction) {
99  this->default_vertical_direction_ = vertical_direction;
100  }
101 
104 
105  protected:
106  HeatpumpIR *heatpump_ir_;
108  void transmit_state() override;
112 
115 };
116 
117 } // namespace heatpumpir
118 } // namespace esphome
119 
120 #endif
void set_vertical_default(VerticalDirection vertical_direction)
Definition: heatpumpir.h:98
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:103
STL namespace.
void set_max_temperature(float temperature)
Definition: heatpumpir.h:102
void transmit_state() override
Transmit via IR the state of this climate controller.
Definition: heatpumpir.cpp:83
const float TEMP_MAX
Definition: heatpumpir.h:82
HorizontalDirection default_horizontal_direction_
Definition: heatpumpir.h:110
The fan mode is set to Horizontal.
Definition: climate_mode.h:78
void set_horizontal_default(HorizontalDirection horizontal_direction)
Definition: heatpumpir.h:95
The fan mode is set to Auto.
Definition: climate_mode.h:52
const float TEMP_MIN
Definition: heatpumpir.h:81
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:94
The fan mode is set to Vertical.
Definition: climate_mode.h:76
VerticalDirection default_vertical_direction_
Definition: heatpumpir.h:111
The fan mode is set to High.
Definition: climate_mode.h:58
The swing mode is set to Off.
Definition: climate_mode.h:72
This is a workaround until we can figure out a way to get the tflite-micro idf component code availab...
Definition: a01nyub.cpp:7
The fan mode is set to Medium.
Definition: climate_mode.h:56