ESPHome  2022.9.1
Public Member Functions | Protected Types | Protected Member Functions
esphome::midea_ir::ControlData Class Reference

#include <midea_data.h>

Inheritance diagram for esphome::midea_ir::ControlData:
esphome::remote_base::MideaData

Public Member Functions

 ControlData ()
 
 ControlData (const MideaData &data)
 
void set_temp (float temp)
 
float get_temp () const
 
void set_mode (ClimateMode mode)
 
ClimateMode get_mode () const
 
void set_fan_mode (ClimateFanMode mode)
 
ClimateFanMode get_fan_mode () const
 
void set_sleep_preset (bool value)
 
bool get_sleep_preset () const
 
void set_fahrenheit (bool value)
 
bool get_fahrenheit () const
 
void fix ()
 
- Public Member Functions inherited from esphome::remote_base::MideaData
 MideaData ()
 
 MideaData (std::initializer_list< uint8_t > data)
 
 MideaData (const std::vector< uint8_t > &data)
 
 MideaData (const MideaData &)=default
 
uint8_t * data ()
 
const uint8_t * data () const
 
uint8_t size () const
 
bool is_valid () const
 
void finalize ()
 
bool is_compliment (const MideaData &rhs) const
 
std::string to_string () const
 
bool operator== (const MideaData &rhs) const
 
MideaDataType type () const
 
template<typename T >
to () const
 
uint8_t & operator[] (size_t idx)
 
const uint8_t & operator[] (size_t idx) const
 

Protected Types

enum  Mode : uint8_t {
  MODE_COOL, MODE_DRY, MODE_AUTO, MODE_HEAT,
  MODE_FAN_ONLY
}
 
enum  FanMode : uint8_t { FAN_AUTO, FAN_LOW, FAN_MEDIUM, FAN_HIGH }
 

Protected Member Functions

void set_fan_mode_ (FanMode mode)
 
FanMode get_fan_mode_ () const
 
void set_mode_ (Mode mode)
 
Mode get_mode_ () const
 
void set_power_ (bool value)
 
bool get_power_ () const
 
- Protected Member Functions inherited from esphome::remote_base::MideaData
uint8_t get_value_ (uint8_t idx, uint8_t mask=255, uint8_t shift=0) const
 
void set_value_ (uint8_t idx, uint8_t value, uint8_t mask=255, uint8_t shift=0)
 
void set_mask_ (uint8_t idx, bool state, uint8_t mask=255)
 
uint8_t calc_cs_ () const
 

Additional Inherited Members

- Public Types inherited from esphome::remote_base::MideaData
enum  MideaDataType : uint8_t { MIDEA_TYPE_CONTROL = 0xA1, MIDEA_TYPE_SPECIAL = 0xA2, MIDEA_TYPE_FOLLOW_ME = 0xA4 }
 
- Protected Attributes inherited from esphome::remote_base::MideaData
std::array< uint8_t, 6 > data_
 
- Static Protected Attributes inherited from esphome::remote_base::MideaData
static const uint8_t OFFSET_CS = 5
 

Detailed Description

Definition at line 13 of file midea_data.h.

Member Enumeration Documentation

◆ FanMode

enum esphome::midea_ir::ControlData::FanMode : uint8_t
protected
Enumerator
FAN_AUTO 
FAN_LOW 
FAN_MEDIUM 
FAN_HIGH 

Definition at line 45 of file midea_data.h.

◆ Mode

enum esphome::midea_ir::ControlData::Mode : uint8_t
protected
Enumerator
MODE_COOL 
MODE_DRY 
MODE_AUTO 
MODE_HEAT 
MODE_FAN_ONLY 

Definition at line 38 of file midea_data.h.

Constructor & Destructor Documentation

◆ ControlData() [1/2]

esphome::midea_ir::ControlData::ControlData ( )
inline

Definition at line 16 of file midea_data.h.

◆ ControlData() [2/2]

esphome::midea_ir::ControlData::ControlData ( const MideaData data)
inline

Definition at line 18 of file midea_data.h.

Member Function Documentation

◆ fix()

void esphome::midea_ir::ControlData::fix ( )

Definition at line 31 of file midea_ir.cpp.

◆ get_fahrenheit()

bool esphome::midea_ir::ControlData::get_fahrenheit ( ) const
inline

Definition at line 33 of file midea_data.h.

◆ get_fan_mode()

ClimateFanMode esphome::midea_ir::ControlData::get_fan_mode ( ) const

Definition at line 99 of file midea_ir.cpp.

◆ get_fan_mode_()

FanMode esphome::midea_ir::ControlData::get_fan_mode_ ( ) const
inlineprotected

Definition at line 52 of file midea_data.h.

◆ get_mode()

ClimateMode esphome::midea_ir::ControlData::get_mode ( ) const

Definition at line 65 of file midea_ir.cpp.

◆ get_mode_()

Mode esphome::midea_ir::ControlData::get_mode_ ( ) const
inlineprotected

Definition at line 54 of file midea_data.h.

◆ get_power_()

bool esphome::midea_ir::ControlData::get_power_ ( ) const
inlineprotected

Definition at line 56 of file midea_data.h.

◆ get_sleep_preset()

bool esphome::midea_ir::ControlData::get_sleep_preset ( ) const
inline

Definition at line 30 of file midea_data.h.

◆ get_temp()

float esphome::midea_ir::ControlData::get_temp ( ) const

Definition at line 24 of file midea_ir.cpp.

◆ set_fahrenheit()

void esphome::midea_ir::ControlData::set_fahrenheit ( bool  value)
inline

Definition at line 32 of file midea_data.h.

◆ set_fan_mode()

void esphome::midea_ir::ControlData::set_fan_mode ( ClimateFanMode  mode)

Definition at line 82 of file midea_ir.cpp.

◆ set_fan_mode_()

void esphome::midea_ir::ControlData::set_fan_mode_ ( FanMode  mode)
inlineprotected

Definition at line 51 of file midea_data.h.

◆ set_mode()

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

Definition at line 41 of file midea_ir.cpp.

◆ set_mode_()

void esphome::midea_ir::ControlData::set_mode_ ( Mode  mode)
inlineprotected

Definition at line 53 of file midea_data.h.

◆ set_power_()

void esphome::midea_ir::ControlData::set_power_ ( bool  value)
inlineprotected

Definition at line 55 of file midea_data.h.

◆ set_sleep_preset()

void esphome::midea_ir::ControlData::set_sleep_preset ( bool  value)
inline

Definition at line 29 of file midea_data.h.

◆ set_temp()

void esphome::midea_ir::ControlData::set_temp ( float  temp)

Definition at line 12 of file midea_ir.cpp.


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