10static const char *
const TAG =
"midea_ir.climate";
34 if (value == 0 || value == 3 || value == 4)
162 if (midea.has_value())
168 ESP_LOGV(TAG,
"Decoded Midea IR data: %s", data.
to_string().c_str());
175 if (
status.get_sleep_preset()) {
BedjetMode mode
BedJet operating mode.
This class is used to encode all control actions on a climate device.
const optional< ClimateSwingMode > & get_swing_mode() const
const optional< ClimatePreset > & get_preset() const
ClimateMode mode
The active mode of the climate device.
optional< ClimateFanMode > fan_mode
The active fan mode of the climate device.
float target_temperature
The target temperature of the climate device.
ClimateSwingMode swing_mode
The active swing mode of the climate device.
void publish_state()
Publish the state of the climate device, to be called from integrations.
optional< ClimatePreset > preset
The active preset of the climate device.
void control(const climate::ClimateCall &call) override
Override control to change settings of the climate device.
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.
void set_mode(ClimateMode mode)
void set_sleep_preset(bool value)
bool get_fahrenheit() const
void set_fahrenheit(bool value)
void set_temp(float temp)
ClimateMode get_mode() const
FanMode get_fan_mode_() const
void set_fan_mode(ClimateFanMode mode)
void set_mode_(Mode mode)
void set_power_(bool value)
ClimateFanMode get_fan_mode() const
void set_fan_mode_(FanMode mode)
bool on_midea_(const MideaData &data)
void transmit_state() override
Transmit via IR the state of this climate controller.
void control(const climate::ClimateCall &call) override
Override control to change settings of the climate device.
bool on_receive(remote_base::RemoteReceiveData data) override
Handle received IR Buffer.
void transmit_(MideaData &data)
static const uint8_t TURBO_TOGGLE
static const uint8_t VSWING_TOGGLE
value_type value_or(U const &v) const
void set_value_(uint8_t idx, uint8_t value, uint8_t mask=255, uint8_t shift=0)
MideaDataType type() const
uint8_t get_value_(uint8_t idx, uint8_t mask=255, uint8_t shift=0) const
void set_mask_(uint8_t idx, bool state, uint8_t mask=255)
std::string to_string() const
void encode(RemoteTransmitData *dst, const MideaData &src) override
optional< MideaData > decode(RemoteReceiveData src) override
RemoteTransmitterBase * transmitter_
@ CLIMATE_PRESET_NONE
No preset is active.
@ CLIMATE_PRESET_BOOST
Device is in boost preset.
@ CLIMATE_PRESET_SLEEP
Device is prepared for sleep.
@ CLIMATE_SWING_OFF
The swing mode is set to Off.
@ CLIMATE_SWING_VERTICAL
The fan mode is set to Vertical.
ClimateMode
Enum for all modes a climate device can be in.
@ CLIMATE_MODE_DRY
The climate device is set to dry/humidity mode.
@ CLIMATE_MODE_FAN_ONLY
The climate device only has the fan enabled, no heating or cooling is taking place.
@ CLIMATE_MODE_HEAT
The climate device is set to heat to reach the target temperature.
@ CLIMATE_MODE_COOL
The climate device is set to cool to reach the target temperature.
@ CLIMATE_MODE_HEAT_COOL
The climate device is set to heat/cool to reach the target temperature.
@ CLIMATE_MODE_OFF
The climate device is off.
@ CLIMATE_FAN_MEDIUM
The fan mode is set to Medium.
@ CLIMATE_FAN_AUTO
The fan mode is set to Auto.
@ CLIMATE_FAN_LOW
The fan mode is set to Low.
@ CLIMATE_FAN_HIGH
The fan mode is set to High.
const uint8_t MIDEA_TEMPC_MAX
const uint8_t MIDEA_TEMPF_MAX
const uint8_t MIDEA_TEMPC_MIN
const uint8_t MIDEA_TEMPF_MIN
Providing packet encoding functions for exchanging data with a remote host.
constexpr float celsius_to_fahrenheit(float value)
Convert degrees Celsius to degrees Fahrenheit.
constexpr float fahrenheit_to_celsius(float value)
Convert degrees Fahrenheit to degrees Celsius.
constexpr const T & clamp(const T &v, const T &lo, const T &hi, Compare comp)