ESPHome  2022.6.2
Go to the documentation of this file.
1 #pragma once
5 namespace esphome {
6 namespace coolix {
8 // Temperature
9 const uint8_t COOLIX_TEMP_MIN = 17; // Celsius
10 const uint8_t COOLIX_TEMP_MAX = 30; // Celsius
13  public:
15  : climate_ir::ClimateIR(COOLIX_TEMP_MIN, COOLIX_TEMP_MAX, 1.0f, true, true,
21  void control(const climate::ClimateCall &call) override {
23  // swing resets after unit powered off
24  if (call.get_mode().has_value() && *call.get_mode() == climate::CLIMATE_MODE_OFF)
27  }
33  protected:
35  void transmit_state() override;
37  bool on_receive(remote_base::RemoteReceiveData data) override { return CoolixClimate::on_coolix(this, data); }
39  bool send_swing_cmd_{false};
40 };
42 } // namespace coolix
43 } // namespace esphome
This class is used to encode all control actions on a climate device.
Definition: climate.h:33
The fan mode is set to Low.
Definition: climate_mode.h:54
ClimateSwingMode swing_mode
The active swing mode of the climate device.
Definition: climate.h:204
const optional< ClimateMode > & get_mode() const
Definition: climate.cpp:260
const uint8_t COOLIX_TEMP_MAX
Definition: coolix.h:10
bool has_value() const
Definition: optional.h:87
void control(const climate::ClimateCall &call) override
Override control to change settings of the climate device.
Definition: climate_ir.cpp:61
const uint8_t COOLIX_TEMP_MIN
Definition: coolix.h:9
bool on_receive(remote_base::RemoteReceiveData data) override
Handle received IR Buffer.
Definition: coolix.h:37
The fan mode is set to Auto.
Definition: climate_mode.h:52
static bool on_coolix(climate::Climate *parent, remote_base::RemoteReceiveData data)
This static method can be used in other climate components that accept the Coolix protocol...
Definition: coolix.cpp:112
void control(const climate::ClimateCall &call) override
Override control to change settings of the climate device.
Definition: coolix.h:21
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 transmit_state() override
Transmit via IR the state of this climate controller.
Definition: coolix.cpp:49
The fan mode is set to Vertical.
Definition: climate_mode.h:74
The fan mode is set to High.
Definition: climate_mode.h:58
The swing mode is set to Off.
Definition: climate_mode.h:70
The climate device is off.
Definition: climate_mode.h:12
const optional< ClimateSwingMode > & get_swing_mode() const
Definition: climate.cpp:273
Definition: a4988.cpp:4
The fan mode is set to Medium.
Definition: climate_mode.h:56
ClimateDevice - This is the base class for all climate integrations.
Definition: climate.h:167