ESPHome  2022.6.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 {
56 };
57 
58 // Simple enum to represent horizontal directios
66 };
67 
68 // Simple enum to represent vertical directions
76 };
77 
78 // Temperature
79 const float TEMP_MIN = 0; // Celsius
80 const float TEMP_MAX = 100; // Celsius
81 
83  public:
85  : climate_ir::ClimateIR(
86  TEMP_MIN, TEMP_MAX, 1.0f, true, true,
89  std::set<climate::ClimateSwingMode>{climate::CLIMATE_SWING_OFF, climate::CLIMATE_SWING_HORIZONTAL,
91  void setup() override;
92  void set_protocol(Protocol protocol) { this->protocol_ = protocol; }
93  void set_horizontal_default(HorizontalDirection horizontal_direction) {
94  this->default_horizontal_direction_ = horizontal_direction;
95  }
96  void set_vertical_default(VerticalDirection vertical_direction) {
97  this->default_vertical_direction_ = vertical_direction;
98  }
99 
102 
103  protected:
104  HeatpumpIR *heatpump_ir_;
106  void transmit_state() override;
110 
113 };
114 
115 } // namespace heatpumpir
116 } // namespace esphome
117 
118 #endif
void set_vertical_default(VerticalDirection vertical_direction)
Definition: heatpumpir.h:96
The fan mode is set to Low.
Definition: climate_mode.h:54
The fan mode is set to Both.
Definition: climate_mode.h:72
void set_min_temperature(float temperature)
Definition: heatpumpir.h:101
STL namespace.
void set_max_temperature(float temperature)
Definition: heatpumpir.h:100
float temperature
Definition: qmp6988.h:71
void transmit_state() override
Transmit via IR the state of this climate controller.
Definition: heatpumpir.cpp:81
const float TEMP_MAX
Definition: heatpumpir.h:80
HorizontalDirection default_horizontal_direction_
Definition: heatpumpir.h:108
The fan mode is set to Horizontal.
Definition: climate_mode.h:76
void set_horizontal_default(HorizontalDirection horizontal_direction)
Definition: heatpumpir.h:93
The fan mode is set to Auto.
Definition: climate_mode.h:52
const float TEMP_MIN
Definition: heatpumpir.h:79
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:23
void set_protocol(Protocol protocol)
Definition: heatpumpir.h:92
The fan mode is set to Vertical.
Definition: climate_mode.h:74
VerticalDirection default_vertical_direction_
Definition: heatpumpir.h:109
The fan mode is set to High.
Definition: climate_mode.h:58
The swing mode is set to Off.
Definition: climate_mode.h:70
Definition: a4988.cpp:4
The fan mode is set to Medium.
Definition: climate_mode.h:56