ESPHome 2026.11.0-dev
Loading...
Searching...
No Matches
esphome::pd_pioneer_ir::ControlData Class Reference

#include <pd_pioneer_data.h>

Public Member Functions

 ControlData ()
 
void set_temp (float temp_c)
 
void set_mode (ClimateMode mode)
 
void set_fan_mode (ClimateFanMode mode)
 
void set_swing_mode (climate::ClimateSwingMode mode)
 
void set_eco (bool enabled)
 
void finalize ()
 Write the fan and swing positions, which share bytes, then the checksums.
 
const PDPioneerData & odd () const
 
const PDPioneerData & even () const
 

Static Public Member Functions

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.
 
static optional< ClimateMode > get_mode (const PDPioneerData &even)
 Empty for a mode byte this remote does not use.
 
static bool get_eco (const PDPioneerData &even)
 
static ClimateFanMode get_fan_mode (const PDPioneerData &even)
 
static bool get_horizontal_swing (const PDPioneerData &odd)
 Only the odd burst carries horizontal swing; the even burst carries vertical swing.
 
static climate::ClimateSwingMode get_swing_mode (const PDPioneerData &even, bool horizontal)
 

Protected Attributes

PDPioneerData odd_
 
PDPioneerData even_
 
ClimateFanMode fan_ {climate::CLIMATE_FAN_HIGH}
 
uint8_t swing_ {0}
 Odd-burst position 7: SWING_VERTICAL and SWING_HORIZONTAL flags.
 

Static Protected Attributes

static constexpr uint8_t MODE_HEAT = 0x01
 
static constexpr uint8_t MODE_DRY = 0x02
 
static constexpr uint8_t MODE_COOL = 0x03
 
static constexpr uint8_t MODE_FAN_ONLY = 0x07
 
static constexpr uint8_t MODE_AUTO = 0x08
 
static constexpr uint8_t PWR_ON = 0x24
 
static constexpr uint8_t PWR_ECO = 0x25
 
static constexpr uint8_t PWR_OFF = 0xA0
 
static constexpr uint8_t SWING_VERTICAL = 0x08
 
static constexpr uint8_t SWING_HORIZONTAL = 0x90
 
static constexpr uint8_t SWING_VERTICAL_EVEN_MASK = 0x38
 Vertical swing also sets this mask on even frame position 8 (fan sub-code).
 

Detailed Description

Definition at line 16 of file pd_pioneer_data.h.

Constructor & Destructor Documentation

◆ ControlData()

esphome::pd_pioneer_ir::ControlData::ControlData ( )

Definition at line 19 of file pd_pioneer_data.cpp.

Member Function Documentation

◆ even()

const PDPioneerData & esphome::pd_pioneer_ir::ControlData::even ( ) const
inline

Definition at line 31 of file pd_pioneer_data.h.

◆ finalize()

void esphome::pd_pioneer_ir::ControlData::finalize ( )

Write the fan and swing positions, which share bytes, then the checksums.

Definition at line 76 of file pd_pioneer_data.cpp.

◆ get_eco()

static bool esphome::pd_pioneer_ir::ControlData::get_eco ( const PDPioneerData & even)
inlinestatic

Definition at line 40 of file pd_pioneer_data.h.

◆ get_fan_mode()

ClimateFanMode esphome::pd_pioneer_ir::ControlData::get_fan_mode ( const PDPioneerData & even)
static

Definition at line 89 of file pd_pioneer_data.cpp.

◆ get_horizontal_swing()

static bool esphome::pd_pioneer_ir::ControlData::get_horizontal_swing ( const PDPioneerData & odd)
inlinestatic

Only the odd burst carries horizontal swing; the even burst carries vertical swing.

Definition at line 43 of file pd_pioneer_data.h.

◆ get_mode()

optional< ClimateMode > esphome::pd_pioneer_ir::ControlData::get_mode ( const PDPioneerData & even)
static

Empty for a mode byte this remote does not use.

Definition at line 57 of file pd_pioneer_data.cpp.

◆ get_swing_mode()

climate::ClimateSwingMode esphome::pd_pioneer_ir::ControlData::get_swing_mode ( const PDPioneerData & even,
bool horizontal )
static

Definition at line 104 of file pd_pioneer_data.cpp.

◆ get_temp()

static float esphome::pd_pioneer_ir::ControlData::get_temp ( const PDPioneerData & even)
inlinestatic

Clamped to the set point range, so a frame from a sibling remote cannot publish an impossible value.

Definition at line 34 of file pd_pioneer_data.h.

◆ odd()

const PDPioneerData & esphome::pd_pioneer_ir::ControlData::odd ( ) const
inline

Definition at line 30 of file pd_pioneer_data.h.

◆ set_eco()

void esphome::pd_pioneer_ir::ControlData::set_eco ( bool enabled)
inline

Definition at line 23 of file pd_pioneer_data.h.

◆ set_fan_mode()

void esphome::pd_pioneer_ir::ControlData::set_fan_mode ( ClimateFanMode mode)
inline

Definition at line 21 of file pd_pioneer_data.h.

◆ set_mode()

void esphome::pd_pioneer_ir::ControlData::set_mode ( ClimateMode mode)

Definition at line 30 of file pd_pioneer_data.cpp.

◆ set_swing_mode()

void esphome::pd_pioneer_ir::ControlData::set_swing_mode ( climate::ClimateSwingMode mode)

Definition at line 98 of file pd_pioneer_data.cpp.

◆ set_temp()

void esphome::pd_pioneer_ir::ControlData::set_temp ( float temp_c)

Definition at line 21 of file pd_pioneer_data.cpp.

Field Documentation

◆ even_

PDPioneerData esphome::pd_pioneer_ir::ControlData::even_
protected

Definition at line 63 of file pd_pioneer_data.h.

◆ fan_

ClimateFanMode esphome::pd_pioneer_ir::ControlData::fan_ {climate::CLIMATE_FAN_HIGH}
protected

Definition at line 64 of file pd_pioneer_data.h.

◆ MODE_AUTO

uint8_t esphome::pd_pioneer_ir::ControlData::MODE_AUTO = 0x08
staticconstexprprotected

Definition at line 51 of file pd_pioneer_data.h.

◆ MODE_COOL

uint8_t esphome::pd_pioneer_ir::ControlData::MODE_COOL = 0x03
staticconstexprprotected

Definition at line 49 of file pd_pioneer_data.h.

◆ MODE_DRY

uint8_t esphome::pd_pioneer_ir::ControlData::MODE_DRY = 0x02
staticconstexprprotected

Definition at line 48 of file pd_pioneer_data.h.

◆ MODE_FAN_ONLY

uint8_t esphome::pd_pioneer_ir::ControlData::MODE_FAN_ONLY = 0x07
staticconstexprprotected

Definition at line 50 of file pd_pioneer_data.h.

◆ MODE_HEAT

uint8_t esphome::pd_pioneer_ir::ControlData::MODE_HEAT = 0x01
staticconstexprprotected

Definition at line 47 of file pd_pioneer_data.h.

◆ odd_

PDPioneerData esphome::pd_pioneer_ir::ControlData::odd_
protected

Definition at line 62 of file pd_pioneer_data.h.

◆ PWR_ECO

uint8_t esphome::pd_pioneer_ir::ControlData::PWR_ECO = 0x25
staticconstexprprotected

Definition at line 54 of file pd_pioneer_data.h.

◆ PWR_OFF

uint8_t esphome::pd_pioneer_ir::ControlData::PWR_OFF = 0xA0
staticconstexprprotected

Definition at line 55 of file pd_pioneer_data.h.

◆ PWR_ON

uint8_t esphome::pd_pioneer_ir::ControlData::PWR_ON = 0x24
staticconstexprprotected

Definition at line 53 of file pd_pioneer_data.h.

◆ swing_

uint8_t esphome::pd_pioneer_ir::ControlData::swing_ {0}
protected

Odd-burst position 7: SWING_VERTICAL and SWING_HORIZONTAL flags.

Definition at line 66 of file pd_pioneer_data.h.

◆ SWING_HORIZONTAL

uint8_t esphome::pd_pioneer_ir::ControlData::SWING_HORIZONTAL = 0x90
staticconstexprprotected

Definition at line 58 of file pd_pioneer_data.h.

◆ SWING_VERTICAL

uint8_t esphome::pd_pioneer_ir::ControlData::SWING_VERTICAL = 0x08
staticconstexprprotected

Definition at line 57 of file pd_pioneer_data.h.

◆ SWING_VERTICAL_EVEN_MASK

uint8_t esphome::pd_pioneer_ir::ControlData::SWING_VERTICAL_EVEN_MASK = 0x38
staticconstexprprotected

Vertical swing also sets this mask on even frame position 8 (fan sub-code).

Definition at line 60 of file pd_pioneer_data.h.


The documentation for this class was generated from the following files: