7using namespace remote_base;
43 climate_ir::ClimateIR::setup();
58 data.command = command;
69 this->preset = to_climate_preset(
mode);
72 this->
transmit_frame_(IRA211Command::IRA211_COMMAND_POWER, IRA211Mode::IRA211_MODE_PROTECTION, fan);
86 if (
mode == IRA211Mode::IRA211_MODE_PROTECTION) {
95 this->preset = to_climate_preset(
mode);
100 if (!decoded.has_value())
105 case IRA211Command::IRA211_COMMAND_SYNC:
106 case IRA211Command::IRA211_COMMAND_POWER:
109 this->fan_mode = to_climate_fan_mode(frame.
fan);
111 case IRA211Command::IRA211_COMMAND_TEMP_UP:
112 case IRA211Command::IRA211_COMMAND_TEMP_DOWN:
115 case IRA211Command::IRA211_COMMAND_MODE:
118 case IRA211Command::IRA211_COMMAND_FAN:
119 this->fan_mode = to_climate_fan_mode(frame.
fan);
BedjetMode mode
BedJet operating mode.
constexpr size_t count(ValueType value) const
Check if the set contains a specific value (std::set compatibility) Returns 1 if present,...
constexpr void erase(ValueType value)
Remove a value from the set (std::set compatibility)
ClimateMode mode
The active mode of the climate device.
float target_temperature
The target temperature of the climate device.
void publish_state()
Publish the state of the climate device, to be called from integrations.
climate::ClimateModeMask modes_
optional< IRA211Data > decode(RemoteReceiveData src)
void transmit_(const typename Protocol::ProtocolData &data, uint32_t send_times=1, uint32_t send_wait=0)
void transmit_state() override
bool on_receive(remote_base::RemoteReceiveData data) override
void transmit_frame_(remote_base::IRA211Command command, remote_base::IRA211Mode mode, remote_base::IRA211Fan fan)
void apply_mode_(remote_base::IRA211Mode mode)
climate::ClimateMode active_mode_() const
T from_ir_code(const IRCode(&table)[N], uint8_t code, T fallback)
The value for code, or fallback when the table has no such code; pass the current state to keep it.
uint8_t to_ir_code(const IRCode(&table)[N], uint8_t value, uint8_t fallback)
The code for value, or fallback when the table has no such value.
ClimatePreset
Enum for all preset modes NOTE: If adding values, update ClimatePresetMask in climate_traits....
@ CLIMATE_PRESET_COMFORT
Device is in comfort preset.
@ CLIMATE_PRESET_ECO
Device is running an energy-saving preset.
ClimateMode
Enum for all modes a climate device can be in.
@ 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.
ClimateFanMode
NOTE: If adding values, update ClimateFanModeMask in climate_traits.h to use the new last value.
@ 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.
One entry of a PROGMEM table that maps a climate enum value to the unit's code.
float get_temperature() const