ESPHome  2024.10.2
Data Structures | Public Types | Public Member Functions | Protected Member Functions | Protected Attributes
esphome::haier::HonClimate Class Reference

#include <hon_climate.h>

Inheritance diagram for esphome::haier::HonClimate:
esphome::haier::HaierClimateBase esphome::Component esphome::climate::Climate esphome::uart::UARTDevice esphome::EntityBase

Data Structures

struct  HardwareInfo
 

Public Types

enum  SubSensorType {
  SubSensorType::OUTDOOR_TEMPERATURE = 0, SubSensorType::HUMIDITY, SubSensorType::INDOOR_COIL_TEMPERATURE, SubSensorType::OUTDOOR_COIL_TEMPERATURE,
  SubSensorType::OUTDOOR_DEFROST_TEMPERATURE, SubSensorType::OUTDOOR_IN_AIR_TEMPERATURE, SubSensorType::OUTDOOR_OUT_AIR_TEMPERATURE, SubSensorType::POWER,
  SubSensorType::COMPRESSOR_FREQUENCY, SubSensorType::COMPRESSOR_CURRENT, SubSensorType::EXPANSION_VALVE_OPEN_DEGREE, SubSensorType::SUB_SENSOR_TYPE_COUNT,
  SubSensorType::BIG_DATA_FRAME_SUB_SENSORS = INDOOR_COIL_TEMPERATURE
}
 
enum  SubBinarySensorType {
  SubBinarySensorType::OUTDOOR_FAN_STATUS = 0, SubBinarySensorType::DEFROST_STATUS, SubBinarySensorType::COMPRESSOR_STATUS, SubBinarySensorType::INDOOR_FAN_STATUS,
  SubBinarySensorType::FOUR_WAY_VALVE_STATUS, SubBinarySensorType::INDOOR_ELECTRIC_HEATING_STATUS, SubBinarySensorType::SUB_BINARY_SENSOR_TYPE_COUNT
}
 
enum  SubTextSensorType { SubTextSensorType::CLEANING_STATUS = 0, SubTextSensorType::PROTOCOL_VERSION, SubTextSensorType::APPLIANCE_NAME, SubTextSensorType::SUB_TEXT_SENSOR_TYPE_COUNT }
 

Public Member Functions

void set_sub_sensor (SubSensorType type, sensor::Sensor *sens)
 
void set_sub_binary_sensor (SubBinarySensorType type, binary_sensor::BinarySensor *sens)
 
void set_sub_text_sensor (SubTextSensorType type, text_sensor::TextSensor *sens)
 
void set_beeper_switch (switch_::Switch *sw)
 
void set_quiet_mode_switch (switch_::Switch *sw)
 
 HonClimate ()
 
 HonClimate (const HonClimate &)=delete
 
HonClimateoperator= (const HonClimate &)=delete
 
 ~HonClimate ()
 
void dump_config () override
 
void set_beeper_state (bool state)
 
bool get_beeper_state () const
 
void set_quiet_mode_state (bool state)
 
bool get_quiet_mode_state () const
 
esphome::optional< hon_protocol::VerticalSwingModeget_vertical_airflow () const
 
void set_vertical_airflow (hon_protocol::VerticalSwingMode direction)
 
esphome::optional< hon_protocol::HorizontalSwingModeget_horizontal_airflow () const
 
void set_horizontal_airflow (hon_protocol::HorizontalSwingMode direction)
 
std::string get_cleaning_status_text () const
 
CleaningState get_cleaning_status () const
 
void start_self_cleaning ()
 
void start_steri_cleaning ()
 
void set_extra_control_packet_bytes_size (size_t size)
 
void set_extra_sensors_packet_bytes_size (size_t size)
 
void set_status_message_header_size (size_t size)
 
void set_control_method (HonControlMethod method)
 
void add_alarm_start_callback (std::function< void(uint8_t, const char *)> &&callback)
 
void add_alarm_end_callback (std::function< void(uint8_t, const char *)> &&callback)
 
float get_active_alarm_count () const
 
- Public Member Functions inherited from esphome::haier::HaierClimateBase
void set_display_switch (switch_::Switch *sw)
 
void set_health_mode_switch (switch_::Switch *sw)
 
 HaierClimateBase ()
 
 HaierClimateBase (const HaierClimateBase &)=delete
 
HaierClimateBaseoperator= (const HaierClimateBase &)=delete
 
 ~HaierClimateBase ()
 
void setup () override
 
void loop () override
 
void control (const esphome::climate::ClimateCall &call) override
 
float get_setup_priority () const override
 
void set_display_state (bool state)
 
bool get_display_state () const
 
void set_health_mode (bool state)
 
bool get_health_mode () const
 
void send_power_on_command ()
 
void send_power_off_command ()
 
void toggle_power ()
 
void reset_protocol ()
 
void set_supported_modes (const std::set< esphome::climate::ClimateMode > &modes)
 
void set_supported_swing_modes (const std::set< esphome::climate::ClimateSwingMode > &modes)
 
void set_supported_presets (const std::set< esphome::climate::ClimatePreset > &presets)
 
bool valid_connection () const
 
size_t available () noexcept override
 
size_t read_array (uint8_t *data, size_t len) noexcept override
 
void write_array (const uint8_t *data, size_t len) noexcept override
 
bool can_send_message () const
 
void set_answer_timeout (uint32_t timeout)
 
void set_send_wifi (bool send_wifi)
 
void send_custom_command (const haier_protocol::HaierMessage &message)
 
void add_status_message_callback (std::function< void(const char *, size_t)> &&callback)
 
- Public Member Functions inherited from esphome::Component
float get_actual_setup_priority () const
 
void set_setup_priority (float priority)
 
virtual float get_loop_priority () const
 priority of loop(). More...
 
void call ()
 
virtual void on_shutdown ()
 
virtual void on_safe_shutdown ()
 
uint32_t get_component_state () const
 
virtual void mark_failed ()
 Mark this component as failed. More...
 
bool is_failed () const
 
bool is_ready () const
 
virtual bool can_proceed ()
 
bool status_has_warning () const
 
bool status_has_error () const
 
void status_set_warning (const char *message="unspecified")
 
void status_set_error (const char *message="unspecified")
 
void status_clear_warning ()
 
void status_clear_error ()
 
void status_momentary_warning (const std::string &name, uint32_t length=5000)
 
void status_momentary_error (const std::string &name, uint32_t length=5000)
 
bool has_overridden_loop () const
 
void set_component_source (const char *source)
 Set where this component was loaded from for some debug messages. More...
 
const char * get_component_source () const
 Get the integration where this component was declared as a string. More...
 
- Public Member Functions inherited from esphome::climate::Climate
 Climate ()
 
void add_on_state_callback (std::function< void(Climate &)> &&callback)
 Add a callback for the climate device state, each time the state of the climate device is updated (using publish_state), this callback will be called. More...
 
void add_on_control_callback (std::function< void(ClimateCall &)> &&callback)
 Add a callback for the climate device configuration; each time the configuration parameters of a climate device is updated (using perform() of a ClimateCall), this callback will be called, before any on_state callback. More...
 
ClimateCall make_call ()
 Make a climate device control call, this is used to control the climate device, see the ClimateCall description for more info. More...
 
void publish_state ()
 Publish the state of the climate device, to be called from integrations. More...
 
ClimateTraits get_traits ()
 Get the traits of this climate device with all overrides applied. More...
 
void set_visual_min_temperature_override (float visual_min_temperature_override)
 
void set_visual_max_temperature_override (float visual_max_temperature_override)
 
void set_visual_temperature_step_override (float target, float current)
 
void set_visual_min_humidity_override (float visual_min_humidity_override)
 
void set_visual_max_humidity_override (float visual_max_humidity_override)
 
- Public Member Functions inherited from esphome::EntityBase
const StringRefget_name () const
 
void set_name (const char *name)
 
bool has_own_name () const
 
std::string get_object_id () const
 
void set_object_id (const char *object_id)
 
uint32_t get_object_id_hash ()
 
bool is_internal () const
 
void set_internal (bool internal)
 
bool is_disabled_by_default () const
 
void set_disabled_by_default (bool disabled_by_default)
 
EntityCategory get_entity_category () const
 
void set_entity_category (EntityCategory entity_category)
 
std::string get_icon () const
 
void set_icon (const char *icon)
 
- Public Member Functions inherited from esphome::uart::UARTDevice
 UARTDevice ()=default
 
 UARTDevice (UARTComponent *parent)
 
void set_uart_parent (UARTComponent *parent)
 
void write_byte (uint8_t data)
 
void write_array (const uint8_t *data, size_t len)
 
void write_array (const std::vector< uint8_t > &data)
 
template<size_t N>
void write_array (const std::array< uint8_t, N > &data)
 
void write_str (const char *str)
 
bool read_byte (uint8_t *data)
 
bool peek_byte (uint8_t *data)
 
bool read_array (uint8_t *data, size_t len)
 
template<size_t N>
optional< std::array< uint8_t, N > > read_array ()
 
int available ()
 
void flush ()
 
int read ()
 
size_t write (uint8_t data)
 
int peek ()
 
void check_uart_settings (uint32_t baud_rate, uint8_t stop_bits=1, UARTParityOptions parity=UART_CONFIG_PARITY_NONE, uint8_t data_bits=8)
 Check that the configuration of the UART bus matches the provided values and otherwise print a warning. More...
 

Protected Member Functions

void update_sub_sensor_ (SubSensorType type, float value)
 
void update_sub_binary_sensor_ (SubBinarySensorType type, uint8_t value)
 
void update_sub_text_sensor_ (SubTextSensorType type, const std::string &value)
 
void set_handlers () override
 
void process_phase (std::chrono::steady_clock::time_point now) override
 
haier_protocol::HaierMessage get_control_message () override
 
haier_protocol::HaierMessage get_power_message (bool state) override
 
void initialization () override
 
bool prepare_pending_action () override
 
void process_protocol_reset () override
 
bool should_get_big_data_ ()
 
haier_protocol::HandlerError get_device_version_answer_handler_ (haier_protocol::FrameType request_type, haier_protocol::FrameType message_type, const uint8_t *data, size_t data_size)
 
haier_protocol::HandlerError get_device_id_answer_handler_ (haier_protocol::FrameType request_type, haier_protocol::FrameType message_type, const uint8_t *data, size_t data_size)
 
haier_protocol::HandlerError status_handler_ (haier_protocol::FrameType request_type, haier_protocol::FrameType message_type, const uint8_t *data, size_t data_size)
 
haier_protocol::HandlerError get_management_information_answer_handler_ (haier_protocol::FrameType request_type, haier_protocol::FrameType message_type, const uint8_t *data, size_t data_size)
 
haier_protocol::HandlerError get_alarm_status_answer_handler_ (haier_protocol::FrameType request_type, haier_protocol::FrameType message_type, const uint8_t *data, size_t data_size)
 
haier_protocol::HandlerError alarm_status_message_handler_ (haier_protocol::FrameType type, const uint8_t *buffer, size_t size)
 
haier_protocol::HandlerError process_status_message_ (const uint8_t *packet, uint8_t size)
 
void process_alarm_message_ (const uint8_t *packet, uint8_t size, bool check_new)
 
void fill_control_messages_queue_ ()
 
void clear_control_messages_queue_ ()
 
- Protected Member Functions inherited from esphome::haier::HaierClimateBase
const char * phase_to_string_ (ProtocolPhases phase)
 
virtual void save_settings ()
 
esphome::climate::ClimateTraits traits () override
 
haier_protocol::HandlerError answer_preprocess_ (haier_protocol::FrameType request_message_type, haier_protocol::FrameType expected_request_message_type, haier_protocol::FrameType answer_message_type, haier_protocol::FrameType expected_answer_message_type, ProtocolPhases expected_phase)
 
haier_protocol::HandlerError report_network_status_answer_handler_ (haier_protocol::FrameType request_type, haier_protocol::FrameType message_type, const uint8_t *data, size_t data_size)
 
haier_protocol::HandlerError timeout_default_handler_ (haier_protocol::FrameType request_type)
 
void send_message_ (const haier_protocol::HaierMessage &command, bool use_crc, uint8_t num_repeats=0, std::chrono::milliseconds interval=std::chrono::milliseconds::zero())
 
virtual void set_phase (ProtocolPhases phase)
 
void reset_phase_ ()
 
void reset_to_idle_ ()
 
bool is_message_interval_exceeded_ (std::chrono::steady_clock::time_point now)
 
bool is_status_request_interval_exceeded_ (std::chrono::steady_clock::time_point now)
 
bool is_control_message_interval_exceeded_ (std::chrono::steady_clock::time_point now)
 
bool is_protocol_initialisation_interval_exceeded_ (std::chrono::steady_clock::time_point now)
 
haier_protocol::HaierMessage get_wifi_signal_message_ ()
 
- Protected Member Functions inherited from esphome::Component
virtual void call_loop ()
 
virtual void call_setup ()
 
virtual void call_dump_config ()
 
void set_interval (const std::string &name, uint32_t interval, std::function< void()> &&f)
 Set an interval function with a unique name. More...
 
void set_interval (uint32_t interval, std::function< void()> &&f)
 
bool cancel_interval (const std::string &name)
 Cancel an interval function. More...
 
void set_retry (const std::string &name, uint32_t initial_wait_time, uint8_t max_attempts, std::function< RetryResult(uint8_t)> &&f, float backoff_increase_factor=1.0f)
 Set an retry function with a unique name. More...
 
void set_retry (uint32_t initial_wait_time, uint8_t max_attempts, std::function< RetryResult(uint8_t)> &&f, float backoff_increase_factor=1.0f)
 
bool cancel_retry (const std::string &name)
 Cancel a retry function. More...
 
void set_timeout (const std::string &name, uint32_t timeout, std::function< void()> &&f)
 Set a timeout function with a unique name. More...
 
void set_timeout (uint32_t timeout, std::function< void()> &&f)
 
bool cancel_timeout (const std::string &name)
 Cancel a timeout function. More...
 
void defer (const std::string &name, std::function< void()> &&f)
 Defer a callback to the next loop() call. More...
 
void defer (std::function< void()> &&f)
 Defer a callback to the next loop() call. More...
 
bool cancel_defer (const std::string &name)
 Cancel a defer callback using the specified name, name must not be empty. More...
 
- Protected Member Functions inherited from esphome::climate::Climate
bool set_fan_mode_ (ClimateFanMode mode)
 Set fan mode. Reset custom fan mode. Return true if fan mode has been changed. More...
 
bool set_custom_fan_mode_ (const std::string &mode)
 Set custom fan mode. Reset primary fan mode. Return true if fan mode has been changed. More...
 
bool set_preset_ (ClimatePreset preset)
 Set preset. Reset custom preset. Return true if preset has been changed. More...
 
bool set_custom_preset_ (const std::string &preset)
 Set custom preset. Reset primary preset. Return true if preset has been changed. More...
 
optional< ClimateDeviceRestoreStaterestore_state_ ()
 Restore the state of the climate device, call this from your setup() method. More...
 
void save_state_ ()
 Internal method to save the state of the climate device to recover memory. More...
 
void dump_traits_ (const char *tag)
 
- Protected Member Functions inherited from esphome::EntityBase
virtual uint32_t hash_base ()
 The hash_base() function has been deprecated. More...
 
void calc_object_id_ ()
 

Protected Attributes

sensor::Sensorsub_sensors_ [(size_t) SubSensorType::SUB_SENSOR_TYPE_COUNT] {nullptr}
 
binary_sensor::BinarySensorsub_binary_sensors_ [(size_t) SubBinarySensorType::SUB_BINARY_SENSOR_TYPE_COUNT] {nullptr}
 
text_sensor::TextSensorsub_text_sensors_ [(size_t) SubTextSensorType::SUB_TEXT_SENSOR_TYPE_COUNT] {nullptr}
 
switch_::Switchbeeper_switch_ {nullptr}
 
switch_::Switchquiet_mode_switch_ {nullptr}
 
CleaningState cleaning_status_
 
bool got_valid_outdoor_temp_
 
esphome::optional< hon_protocol::VerticalSwingModepending_vertical_direction_ {}
 
esphome::optional< hon_protocol::HorizontalSwingModepending_horizontal_direction_ {}
 
esphome::optional< HardwareInfohvac_hardware_info_ {}
 
uint8_t active_alarms_ [8]
 
int extra_control_packet_bytes_ {0}
 
int extra_sensors_packet_bytes_ {4}
 
int status_message_header_size_ {0}
 
int real_control_packet_size_ {sizeof(hon_protocol::HaierPacketControl)}
 
int real_sensors_packet_size_ {sizeof(hon_protocol::HaierPacketSensors) + 4}
 
HonControlMethod control_method_
 
std::queue< haier_protocol::HaierMessage > control_messages_queue_
 
CallbackManager< void(uint8_t, const char *)> alarm_start_callback_ {}
 
CallbackManager< void(uint8_t, const char *)> alarm_end_callback_ {}
 
float active_alarm_count_ {NAN}
 
std::chrono::steady_clock::time_point last_alarm_request_
 
int big_data_sensors_ {0}
 
esphome::optional< hon_protocol::VerticalSwingModecurrent_vertical_swing_ {}
 
esphome::optional< hon_protocol::HorizontalSwingModecurrent_horizontal_swing_ {}
 
HonSettings settings_
 
ESPPreferenceObject hon_rtc_
 
SwitchState quiet_mode_state_ {SwitchState::OFF}
 
- Protected Attributes inherited from esphome::haier::HaierClimateBase
switch_::Switchdisplay_switch_ {nullptr}
 
switch_::Switchhealth_mode_switch_ {nullptr}
 
haier_protocol::ProtocolHandler haier_protocol_
 
ProtocolPhases protocol_phase_
 
esphome::optional< PendingActionaction_request_
 
uint8_t fan_mode_speed_
 
uint8_t other_modes_fan_speed_
 
SwitchState display_status_ {SwitchState::ON}
 
SwitchState health_mode_ {SwitchState::OFF}
 
bool force_send_control_
 
bool forced_request_status_
 
bool reset_protocol_request_
 
bool send_wifi_signal_
 
bool use_crc_
 
esphome::climate::ClimateTraits traits_
 
HvacSettings current_hvac_settings_
 
HvacSettings next_hvac_settings_
 
std::unique_ptr< uint8_t[]> last_status_message_ {nullptr}
 
std::chrono::steady_clock::time_point last_request_timestamp_
 
std::chrono::steady_clock::time_point last_valid_status_timestamp_
 
std::chrono::steady_clock::time_point last_status_request_
 
std::chrono::steady_clock::time_point last_signal_request_
 
CallbackManager< void(const char *, size_t)> status_message_callback_ {}
 
ESPPreferenceObject base_rtc_
 
- Protected Attributes inherited from esphome::Component
uint32_t component_state_ {0x0000}
 State of this component. More...
 
float setup_priority_override_ {NAN}
 
const char * component_source_ {nullptr}
 
- Protected Attributes inherited from esphome::climate::Climate
friend ClimateCall
 
CallbackManager< void(Climate &)> state_callback_ {}
 
CallbackManager< void(ClimateCall &)> control_callback_ {}
 
ESPPreferenceObject rtc_
 
optional< float > visual_min_temperature_override_ {}
 
optional< float > visual_max_temperature_override_ {}
 
optional< float > visual_target_temperature_step_override_ {}
 
optional< float > visual_current_temperature_step_override_ {}
 
optional< float > visual_min_humidity_override_ {}
 
optional< float > visual_max_humidity_override_ {}
 
- Protected Attributes inherited from esphome::EntityBase
StringRef name_
 
const char * object_id_c_str_ {nullptr}
 
const char * icon_c_str_ {nullptr}
 
uint32_t object_id_hash_
 
bool has_own_name_ {false}
 
bool internal_ {false}
 
bool disabled_by_default_ {false}
 
EntityCategory entity_category_ {ENTITY_CATEGORY_NONE}
 
- Protected Attributes inherited from esphome::uart::UARTDevice
UARTComponentparent_ {nullptr}
 

Additional Inherited Members

- Data Fields inherited from esphome::climate::Climate
ClimateMode mode {CLIMATE_MODE_OFF}
 The active mode of the climate device. More...
 
ClimateAction action {CLIMATE_ACTION_OFF}
 The active state of the climate device. More...
 
float current_temperature {NAN}
 The current temperature of the climate device, as reported from the integration. More...
 
float current_humidity {NAN}
 The current humidity of the climate device, as reported from the integration. More...
 
union {
   float   target_temperature
 The target temperature of the climate device. More...
 
   struct {
      float   target_temperature_low {NAN}
 The minimum target temperature of the climate device, for climate devices with split target temperature. More...
 
      float   target_temperature_high {NAN}
 The maximum target temperature of the climate device, for climate devices with split target temperature. More...
 
   } 
 
}; 
 
float target_humidity
 The target humidity of the climate device. More...
 
optional< ClimateFanModefan_mode
 The active fan mode of the climate device. More...
 
ClimateSwingMode swing_mode
 The active swing mode of the climate device. More...
 
optional< std::string > custom_fan_mode
 The active custom fan mode of the climate device. More...
 
optional< ClimatePresetpreset
 The active preset of the climate device. More...
 
optional< std::string > custom_preset
 The active custom preset mode of the climate device. More...
 
- Protected Types inherited from esphome::haier::HaierClimateBase
enum  ProtocolPhases {
  ProtocolPhases::UNKNOWN = -1, ProtocolPhases::SENDING_INIT_1 = 0, ProtocolPhases::SENDING_INIT_2, ProtocolPhases::SENDING_FIRST_STATUS_REQUEST,
  ProtocolPhases::SENDING_FIRST_ALARM_STATUS_REQUEST, ProtocolPhases::IDLE, ProtocolPhases::SENDING_STATUS_REQUEST, ProtocolPhases::SENDING_UPDATE_SIGNAL_REQUEST,
  ProtocolPhases::SENDING_SIGNAL_LEVEL, ProtocolPhases::SENDING_CONTROL, ProtocolPhases::SENDING_ACTION_COMMAND, ProtocolPhases::SENDING_ALARM_STATUS_REQUEST,
  ProtocolPhases::NUM_PROTOCOL_PHASES
}
 
enum  SwitchState { SwitchState::OFF = 0b00, SwitchState::ON = 0b01, SwitchState::PENDING_OFF = 0b10, SwitchState::PENDING_ON = 0b11 }
 

Detailed Description

Definition at line 38 of file hon_climate.h.

Member Enumeration Documentation

◆ SubBinarySensorType

Enumerator
OUTDOOR_FAN_STATUS 
DEFROST_STATUS 
COMPRESSOR_STATUS 
INDOOR_FAN_STATUS 
FOUR_WAY_VALVE_STATUS 
INDOOR_ELECTRIC_HEATING_STATUS 
SUB_BINARY_SENSOR_TYPE_COUNT 

Definition at line 66 of file hon_climate.h.

◆ SubSensorType

Enumerator
OUTDOOR_TEMPERATURE 
HUMIDITY 
INDOOR_COIL_TEMPERATURE 
OUTDOOR_COIL_TEMPERATURE 
OUTDOOR_DEFROST_TEMPERATURE 
OUTDOOR_IN_AIR_TEMPERATURE 
OUTDOOR_OUT_AIR_TEMPERATURE 
POWER 
COMPRESSOR_FREQUENCY 
COMPRESSOR_CURRENT 
EXPANSION_VALVE_OPEN_DEGREE 
SUB_SENSOR_TYPE_COUNT 
BIG_DATA_FRAME_SUB_SENSORS 

Definition at line 41 of file hon_climate.h.

◆ SubTextSensorType

Enumerator
CLEANING_STATUS 
PROTOCOL_VERSION 
APPLIANCE_NAME 
SUB_TEXT_SENSOR_TYPE_COUNT 

Definition at line 83 of file hon_climate.h.

Constructor & Destructor Documentation

◆ HonClimate() [1/2]

esphome::haier::HonClimate::HonClimate ( )

Definition at line 24 of file hon_climate.cpp.

◆ HonClimate() [2/2]

esphome::haier::HonClimate::HonClimate ( const HonClimate )
delete

◆ ~HonClimate()

esphome::haier::HonClimate::~HonClimate ( )

Definition at line 32 of file hon_climate.cpp.

Member Function Documentation

◆ add_alarm_end_callback()

void esphome::haier::HonClimate::add_alarm_end_callback ( std::function< void(uint8_t, const char *)> &&  callback)

Definition at line 112 of file hon_climate.cpp.

◆ add_alarm_start_callback()

void esphome::haier::HonClimate::add_alarm_start_callback ( std::function< void(uint8_t, const char *)> &&  callback)

Definition at line 108 of file hon_climate.cpp.

◆ alarm_status_message_handler_()

haier_protocol::HandlerError esphome::haier::HonClimate::alarm_status_message_handler_ ( haier_protocol::FrameType  type,
const uint8_t *  buffer,
size_t  size 
)
protected

Definition at line 286 of file hon_climate.cpp.

◆ clear_control_messages_queue_()

void esphome::haier::HonClimate::clear_control_messages_queue_ ( )
protected

Definition at line 1292 of file hon_climate.cpp.

◆ dump_config()

void esphome::haier::HonClimate::dump_config ( )
overridevirtual

Reimplemented from esphome::haier::HaierClimateBase.

Definition at line 331 of file hon_climate.cpp.

◆ fill_control_messages_queue_()

void esphome::haier::HonClimate::fill_control_messages_queue_ ( )
protected

Definition at line 1064 of file hon_climate.cpp.

◆ get_active_alarm_count()

float esphome::haier::HonClimate::get_active_alarm_count ( ) const
inline

Definition at line 128 of file hon_climate.h.

◆ get_alarm_status_answer_handler_()

haier_protocol::HandlerError esphome::haier::HonClimate::get_alarm_status_answer_handler_ ( haier_protocol::FrameType  request_type,
haier_protocol::FrameType  message_type,
const uint8_t *  data,
size_t  data_size 
)
protected

Definition at line 260 of file hon_climate.cpp.

◆ get_beeper_state()

bool esphome::haier::HonClimate::get_beeper_state ( ) const

Definition at line 44 of file hon_climate.cpp.

◆ get_cleaning_status()

CleaningState esphome::haier::HonClimate::get_cleaning_status ( ) const

Definition at line 90 of file hon_climate.cpp.

◆ get_cleaning_status_text()

std::string esphome::haier::HonClimate::get_cleaning_status_text ( ) const

Definition at line 79 of file hon_climate.cpp.

◆ get_control_message()

haier_protocol::HaierMessage esphome::haier::HonClimate::get_control_message ( )
overrideprotectedvirtual

Implements esphome::haier::HaierClimateBase.

Definition at line 515 of file hon_climate.cpp.

◆ get_device_id_answer_handler_()

haier_protocol::HandlerError esphome::haier::HonClimate::get_device_id_answer_handler_ ( haier_protocol::FrameType  request_type,
haier_protocol::FrameType  message_type,
const uint8_t *  data,
size_t  data_size 
)
protected

Definition at line 167 of file hon_climate.cpp.

◆ get_device_version_answer_handler_()

haier_protocol::HandlerError esphome::haier::HonClimate::get_device_version_answer_handler_ ( haier_protocol::FrameType  request_type,
haier_protocol::FrameType  message_type,
const uint8_t *  data,
size_t  data_size 
)
protected

Definition at line 116 of file hon_climate.cpp.

◆ get_horizontal_airflow()

esphome::optional< hon_protocol::HorizontalSwingMode > esphome::haier::HonClimate::get_horizontal_airflow ( ) const

Definition at line 70 of file hon_climate.cpp.

◆ get_management_information_answer_handler_()

haier_protocol::HandlerError esphome::haier::HonClimate::get_management_information_answer_handler_ ( haier_protocol::FrameType  request_type,
haier_protocol::FrameType  message_type,
const uint8_t *  data,
size_t  data_size 
)
protected

Definition at line 245 of file hon_climate.cpp.

◆ get_power_message()

haier_protocol::HaierMessage esphome::haier::HonClimate::get_power_message ( bool  state)
overrideprotectedvirtual

Implements esphome::haier::HaierClimateBase.

Definition at line 485 of file hon_climate.cpp.

◆ get_quiet_mode_state()

bool esphome::haier::HonClimate::get_quiet_mode_state ( ) const

Definition at line 57 of file hon_climate.cpp.

◆ get_vertical_airflow()

esphome::optional< hon_protocol::VerticalSwingMode > esphome::haier::HonClimate::get_vertical_airflow ( ) const

Definition at line 61 of file hon_climate.cpp.

◆ initialization()

void esphome::haier::HonClimate::initialization ( )
overrideprotectedvirtual

Reimplemented from esphome::haier::HaierClimateBase.

Definition at line 499 of file hon_climate.cpp.

◆ operator=()

HonClimate& esphome::haier::HonClimate::operator= ( const HonClimate )
delete

◆ prepare_pending_action()

bool esphome::haier::HonClimate::prepare_pending_action ( )
overrideprotectedvirtual

Reimplemented from esphome::haier::HaierClimateBase.

Definition at line 1297 of file hon_climate.cpp.

◆ process_alarm_message_()

void esphome::haier::HonClimate::process_alarm_message_ ( const uint8_t *  packet,
uint8_t  size,
bool  check_new 
)
protected

Definition at line 675 of file hon_climate.cpp.

◆ process_phase()

void esphome::haier::HonClimate::process_phase ( std::chrono::steady_clock::time_point  now)
overrideprotectedvirtual

Implements esphome::haier::HaierClimateBase.

Definition at line 350 of file hon_climate.cpp.

◆ process_protocol_reset()

void esphome::haier::HonClimate::process_protocol_reset ( )
overrideprotectedvirtual

Reimplemented from esphome::haier::HaierClimateBase.

Definition at line 1354 of file hon_climate.cpp.

◆ process_status_message_()

haier_protocol::HandlerError esphome::haier::HonClimate::process_status_message_ ( const uint8_t *  packet,
uint8_t  size 
)
protected

Definition at line 809 of file hon_climate.cpp.

◆ set_beeper_state()

void esphome::haier::HonClimate::set_beeper_state ( bool  state)

Definition at line 34 of file hon_climate.cpp.

◆ set_beeper_switch()

void esphome::haier::HonClimate::set_beeper_switch ( switch_::Switch sw)

Definition at line 794 of file hon_climate.cpp.

◆ set_control_method()

void esphome::haier::HonClimate::set_control_method ( HonControlMethod  method)
inline

Definition at line 125 of file hon_climate.h.

◆ set_extra_control_packet_bytes_size()

void esphome::haier::HonClimate::set_extra_control_packet_bytes_size ( size_t  size)
inline

Definition at line 122 of file hon_climate.h.

◆ set_extra_sensors_packet_bytes_size()

void esphome::haier::HonClimate::set_extra_sensors_packet_bytes_size ( size_t  size)
inline

Definition at line 123 of file hon_climate.h.

◆ set_handlers()

void esphome::haier::HonClimate::set_handlers ( )
overrideprotectedvirtual

Implements esphome::haier::HaierClimateBase.

Definition at line 299 of file hon_climate.cpp.

◆ set_horizontal_airflow()

void esphome::haier::HonClimate::set_horizontal_airflow ( hon_protocol::HorizontalSwingMode  direction)

Definition at line 74 of file hon_climate.cpp.

◆ set_quiet_mode_state()

void esphome::haier::HonClimate::set_quiet_mode_state ( bool  state)

Definition at line 46 of file hon_climate.cpp.

◆ set_quiet_mode_switch()

void esphome::haier::HonClimate::set_quiet_mode_switch ( switch_::Switch sw)

Definition at line 801 of file hon_climate.cpp.

◆ set_status_message_header_size()

void esphome::haier::HonClimate::set_status_message_header_size ( size_t  size)
inline

Definition at line 124 of file hon_climate.h.

◆ set_sub_binary_sensor()

void esphome::haier::HonClimate::set_sub_binary_sensor ( SubBinarySensorType  type,
binary_sensor::BinarySensor sens 
)

Definition at line 744 of file hon_climate.cpp.

◆ set_sub_sensor()

void esphome::haier::HonClimate::set_sub_sensor ( SubSensorType  type,
sensor::Sensor sens 
)

Definition at line 720 of file hon_climate.cpp.

◆ set_sub_text_sensor()

void esphome::haier::HonClimate::set_sub_text_sensor ( SubTextSensorType  type,
text_sensor::TextSensor sens 
)

Definition at line 767 of file hon_climate.cpp.

◆ set_vertical_airflow()

void esphome::haier::HonClimate::set_vertical_airflow ( hon_protocol::VerticalSwingMode  direction)

Definition at line 65 of file hon_climate.cpp.

◆ should_get_big_data_()

bool esphome::haier::HonClimate::should_get_big_data_ ( )
protected

Definition at line 1367 of file hon_climate.cpp.

◆ start_self_cleaning()

void esphome::haier::HonClimate::start_self_cleaning ( )

Definition at line 92 of file hon_climate.cpp.

◆ start_steri_cleaning()

void esphome::haier::HonClimate::start_steri_cleaning ( )

Definition at line 100 of file hon_climate.cpp.

◆ status_handler_()

haier_protocol::HandlerError esphome::haier::HonClimate::status_handler_ ( haier_protocol::FrameType  request_type,
haier_protocol::FrameType  message_type,
const uint8_t *  data,
size_t  data_size 
)
protected

Definition at line 182 of file hon_climate.cpp.

◆ update_sub_binary_sensor_()

void esphome::haier::HonClimate::update_sub_binary_sensor_ ( SubBinarySensorType  type,
uint8_t  value 
)
protected

Definition at line 755 of file hon_climate.cpp.

◆ update_sub_sensor_()

void esphome::haier::HonClimate::update_sub_sensor_ ( SubSensorType  type,
float  value 
)
protected

Definition at line 733 of file hon_climate.cpp.

◆ update_sub_text_sensor_()

void esphome::haier::HonClimate::update_sub_text_sensor_ ( SubTextSensorType  type,
const std::string &  value 
)
protected

Definition at line 786 of file hon_climate.cpp.

Field Documentation

◆ active_alarm_count_

float esphome::haier::HonClimate::active_alarm_count_ {NAN}
protected

Definition at line 187 of file hon_climate.h.

◆ active_alarms_

uint8_t esphome::haier::HonClimate::active_alarms_[8]
protected

Definition at line 177 of file hon_climate.h.

◆ alarm_end_callback_

CallbackManager<void(uint8_t, const char *)> esphome::haier::HonClimate::alarm_end_callback_ {}
protected

Definition at line 186 of file hon_climate.h.

◆ alarm_start_callback_

CallbackManager<void(uint8_t, const char *)> esphome::haier::HonClimate::alarm_start_callback_ {}
protected

Definition at line 185 of file hon_climate.h.

◆ beeper_switch_

switch_::Switch* esphome::haier::HonClimate::beeper_switch_ {nullptr}
protected

Definition at line 101 of file hon_climate.h.

◆ big_data_sensors_

int esphome::haier::HonClimate::big_data_sensors_ {0}
protected

Definition at line 189 of file hon_climate.h.

◆ cleaning_status_

CleaningState esphome::haier::HonClimate::cleaning_status_
protected

Definition at line 172 of file hon_climate.h.

◆ control_messages_queue_

std::queue<haier_protocol::HaierMessage> esphome::haier::HonClimate::control_messages_queue_
protected

Definition at line 184 of file hon_climate.h.

◆ control_method_

HonControlMethod esphome::haier::HonClimate::control_method_
protected

Definition at line 183 of file hon_climate.h.

◆ current_horizontal_swing_

esphome::optional<hon_protocol::HorizontalSwingMode> esphome::haier::HonClimate::current_horizontal_swing_ {}
protected

Definition at line 191 of file hon_climate.h.

◆ current_vertical_swing_

esphome::optional<hon_protocol::VerticalSwingMode> esphome::haier::HonClimate::current_vertical_swing_ {}
protected

Definition at line 190 of file hon_climate.h.

◆ extra_control_packet_bytes_

int esphome::haier::HonClimate::extra_control_packet_bytes_ {0}
protected

Definition at line 178 of file hon_climate.h.

◆ extra_sensors_packet_bytes_

int esphome::haier::HonClimate::extra_sensors_packet_bytes_ {4}
protected

Definition at line 179 of file hon_climate.h.

◆ got_valid_outdoor_temp_

bool esphome::haier::HonClimate::got_valid_outdoor_temp_
protected

Definition at line 173 of file hon_climate.h.

◆ hon_rtc_

ESPPreferenceObject esphome::haier::HonClimate::hon_rtc_
protected

Definition at line 193 of file hon_climate.h.

◆ hvac_hardware_info_

esphome::optional<HardwareInfo> esphome::haier::HonClimate::hvac_hardware_info_ {}
protected

Definition at line 176 of file hon_climate.h.

◆ last_alarm_request_

std::chrono::steady_clock::time_point esphome::haier::HonClimate::last_alarm_request_
protected

Definition at line 188 of file hon_climate.h.

◆ pending_horizontal_direction_

esphome::optional<hon_protocol::HorizontalSwingMode> esphome::haier::HonClimate::pending_horizontal_direction_ {}
protected

Definition at line 175 of file hon_climate.h.

◆ pending_vertical_direction_

esphome::optional<hon_protocol::VerticalSwingMode> esphome::haier::HonClimate::pending_vertical_direction_ {}
protected

Definition at line 174 of file hon_climate.h.

◆ quiet_mode_state_

SwitchState esphome::haier::HonClimate::quiet_mode_state_ {SwitchState::OFF}
protected

Definition at line 194 of file hon_climate.h.

◆ quiet_mode_switch_

switch_::Switch* esphome::haier::HonClimate::quiet_mode_switch_ {nullptr}
protected

Definition at line 102 of file hon_climate.h.

◆ real_control_packet_size_

int esphome::haier::HonClimate::real_control_packet_size_ {sizeof(hon_protocol::HaierPacketControl)}
protected

Definition at line 181 of file hon_climate.h.

◆ real_sensors_packet_size_

int esphome::haier::HonClimate::real_sensors_packet_size_ {sizeof(hon_protocol::HaierPacketSensors) + 4}
protected

Definition at line 182 of file hon_climate.h.

◆ settings_

HonSettings esphome::haier::HonClimate::settings_
protected

Definition at line 192 of file hon_climate.h.

◆ status_message_header_size_

int esphome::haier::HonClimate::status_message_header_size_ {0}
protected

Definition at line 180 of file hon_climate.h.

◆ sub_binary_sensors_

binary_sensor::BinarySensor* esphome::haier::HonClimate::sub_binary_sensors_[(size_t) SubBinarySensorType::SUB_BINARY_SENSOR_TYPE_COUNT] {nullptr}
protected

Definition at line 79 of file hon_climate.h.

◆ sub_sensors_

sensor::Sensor* esphome::haier::HonClimate::sub_sensors_[(size_t) SubSensorType::SUB_SENSOR_TYPE_COUNT] {nullptr}
protected

Definition at line 62 of file hon_climate.h.

◆ sub_text_sensors_

text_sensor::TextSensor* esphome::haier::HonClimate::sub_text_sensors_[(size_t) SubTextSensorType::SUB_TEXT_SENSOR_TYPE_COUNT] {nullptr}
protected

Definition at line 93 of file hon_climate.h.


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