15 data.set_mode(this->
mode);
30 if (!frame.has_value())
32 if (frame->is_odd_burst()) {
38 if (!decoded.has_value())
41 if (this->
get_traits().supports_mode(*decoded)) {
42 this->
mode = *decoded;
44 ESP_LOGD(TAG,
"Received mode %s is not enabled, keeping the current mode",
ClimateMode mode
The active mode of the climate device.
optional< ClimateFanMode > fan_mode
The active fan mode of the climate device.
ClimateTraits get_traits()
Get the traits of this climate device with all overrides applied.
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.
static optional< ClimateMode > get_mode(const PDPioneerData &even)
Empty for a mode byte this remote does not use.
static float get_temp(const PDPioneerData &even)
Clamped to the set point range, so a frame from a sibling remote cannot publish an impossible value.
void set_swing_mode(climate::ClimateSwingMode mode)
static bool get_horizontal_swing(const PDPioneerData &odd)
Only the odd burst carries horizontal swing; the even burst carries vertical swing.
static ClimateFanMode get_fan_mode(const PDPioneerData &even)
void finalize()
Write the fan and swing positions, which share bytes, then the checksums.
void set_eco(bool enabled)
const PDPioneerData & even() const
void set_temp(float temp_c)
static bool get_eco(const PDPioneerData &even)
static climate::ClimateSwingMode get_swing_mode(const PDPioneerData &even, bool horizontal)
const PDPioneerData & odd() const
void set_fan_mode(ClimateFanMode mode)
void transmit_state() override
bool on_receive(remote_base::RemoteReceiveData data) override
bool rx_horizontal_swing_
optional< PDPioneerData > decode(RemoteReceiveData src)
void transmit_(const typename Protocol::ProtocolData &data, uint32_t send_times=1, uint32_t send_wait=0)
@ CLIMATE_PRESET_NONE
No preset is active.
@ CLIMATE_PRESET_ECO
Device is running an energy-saving preset.
@ CLIMATE_MODE_FAN_ONLY
The climate device only has the fan enabled, no heating or cooling is taking place.
@ CLIMATE_MODE_OFF
The climate device is off.
const LogString * climate_mode_to_string(ClimateMode mode)
Convert the given ClimateMode to a human-readable string.
@ CLIMATE_FAN_AUTO
The fan mode is set to Auto.
ESPHOME_LOG_TAG(TAG, "pd_pioneer_ir")