10 static const char *
const TAG =
"midea_ir.climate";
34 if (value == 0 || value == 3 || value == 4)
132 auto transmit = this->transmitter_->transmit();
140 this->transmit_(data);
141 this->swing_ =
false;
146 this->transmit_(data);
147 this->boost_ =
false;
157 this->transmit_(data);
162 if (midea.has_value())
163 return this->on_midea_(*midea);
168 ESP_LOGV(TAG,
"Decoded Midea IR data: %s", data.
to_string().c_str());
180 this->publish_state();
194 this->publish_state();
This class is used to encode all control actions on a climate device.
void transmit_state() override
Transmit via IR the state of this climate controller.
MideaDataType type() const
FanMode get_fan_mode_() const
const uint8_t MIDEA_TEMPF_MIN
static const uint8_t TURBO_TOGGLE
const optional< ClimateMode > & get_mode() const
const uint8_t MIDEA_TEMPC_MAX
void set_power_(bool value)
void control(const climate::ClimateCall &call) override
Override control to change settings of the climate device.
bool get_fahrenheit() const
void encode(RemoteTransmitData *dst, const MideaData &src) override
void set_sleep_preset(bool value)
void control(const climate::ClimateCall &call) override
Override control to change settings of the climate device.
void set_value_(uint8_t idx, uint8_t value, uint8_t mask=255, uint8_t shift=0)
ClimateSwingMode swing_mode
Device is prepared for sleep.
void set_fahrenheit(bool value)
void transmit_(MideaData &data)
constexpr float celsius_to_fahrenheit(float value)
Convert degrees Celsius to degrees Fahrenheit.
const optional< ClimatePreset > & get_preset() const
void set_mode_(Mode mode)
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...
BedjetMode mode
BedJet operating mode.
uint8_t get_value_(uint8_t idx, uint8_t mask=255, uint8_t shift=0) const
static const uint8_t VSWING_TOGGLE
The fan mode is set to Vertical.
std::string to_string() const
The swing mode is set to Off.
The climate device is off.
optional< MideaData > decode(RemoteReceiveData src) override
Device is in boost preset.
void set_temp(float temp)
void set_mask_(uint8_t idx, bool state, uint8_t mask=255)
bool get_sleep_preset() const
const optional< ClimateSwingMode > & get_swing_mode() const
Implementation of SPI Controller mode.
void set_fan_mode(ClimateFanMode mode)
void set_mode(ClimateMode mode)
const uint8_t MIDEA_TEMPC_MIN
constexpr float fahrenheit_to_celsius(float value)
Convert degrees Fahrenheit to degrees Celsius.
The climate device only has the fan enabled, no heating or cooling is taking place.
bool on_midea_(const MideaData &data)
const uint8_t MIDEA_TEMPF_MAX
bool on_receive(remote_base::RemoteReceiveData data) override
Handle received IR Buffer.
ClimateMode get_mode() const
void set_fan_mode_(FanMode mode)
ClimateFanMode get_fan_mode() const