15 static const char *
const TAG =
"haier.climate";
24 HonClimate::HonClimate()
93 return "56°C Steri-Clean";
103 ESP_LOGI(TAG,
"Sending self cleaning start request");
111 ESP_LOGI(TAG,
"Sending steri cleaning start request");
126 haier_protocol::FrameType message_type,
129 if (message_type == haier_protocol::FrameType::INVALID) {
130 ESP_LOGW(TAG,
"It looks like your ESPHome Haier climate configuration is wrong. You should use the smartAir2 " 131 "protocol instead of hOn");
133 return haier_protocol::HandlerError::INVALID_ANSWER;
135 haier_protocol::HandlerError result =
136 this->
answer_preprocess_(request_type, haier_protocol::FrameType::GET_DEVICE_VERSION, message_type,
138 if (result == haier_protocol::HandlerError::HANDLER_OK) {
141 return haier_protocol::HandlerError::WRONG_MESSAGE_STRUCTURE;
156 #ifdef USE_TEXT_SENSOR 177 haier_protocol::FrameType message_type,
179 haier_protocol::HandlerError result =
180 this->
answer_preprocess_(request_type, haier_protocol::FrameType::GET_DEVICE_ID, message_type,
182 if (result == haier_protocol::HandlerError::HANDLER_OK) {
192 haier_protocol::FrameType message_type,
const uint8_t *data,
194 haier_protocol::HandlerError result =
195 this->
answer_preprocess_(request_type, haier_protocol::FrameType::CONTROL, message_type,
197 if (result == haier_protocol::HandlerError::HANDLER_OK) {
199 if (result != haier_protocol::HandlerError::HANDLER_OK) {
200 ESP_LOGW(TAG,
"Error %d while parsing Status packet", (
int) result);
220 ESP_LOGI(TAG,
"First HVAC status received");
255 haier_protocol::FrameType request_type, haier_protocol::FrameType message_type,
const uint8_t *data,
258 request_type, haier_protocol::FrameType::GET_MANAGEMENT_INFORMATION, message_type,
260 if (result == haier_protocol::HandlerError::HANDLER_OK) {
270 haier_protocol::FrameType message_type,
272 if (request_type == haier_protocol::FrameType::GET_ALARM_STATUS) {
273 if (message_type != haier_protocol::FrameType::GET_ALARM_STATUS_RESPONSE) {
276 return haier_protocol::HandlerError::UNSUPPORTED_MESSAGE;
282 return haier_protocol::HandlerError::UNEXPECTED_MESSAGE;
285 return haier_protocol::HandlerError::WRONG_MESSAGE_STRUCTURE;
288 return haier_protocol::HandlerError::HANDLER_OK;
291 return haier_protocol::HandlerError::UNSUPPORTED_MESSAGE;
296 const uint8_t *buffer,
size_t size) {
297 haier_protocol::HandlerError result = haier_protocol::HandlerError::HANDLER_OK;
300 result = haier_protocol::HandlerError::WRONG_MESSAGE_STRUCTURE;
303 this->
haier_protocol_.send_answer(haier_protocol::HaierMessage(haier_protocol::FrameType::CONFIRM));
311 haier_protocol::FrameType::GET_DEVICE_VERSION,
313 std::placeholders::_3, std::placeholders::_4));
315 haier_protocol::FrameType::GET_DEVICE_ID,
317 std::placeholders::_3, std::placeholders::_4));
319 haier_protocol::FrameType::CONTROL,
321 std::placeholders::_4));
323 haier_protocol::FrameType::GET_MANAGEMENT_INFORMATION,
325 std::placeholders::_2, std::placeholders::_3, std::placeholders::_4));
327 haier_protocol::FrameType::GET_ALARM_STATUS,
329 std::placeholders::_3, std::placeholders::_4));
331 haier_protocol::FrameType::REPORT_NETWORK_STATUS,
333 std::placeholders::_3, std::placeholders::_4));
335 haier_protocol::FrameType::ALARM_STATUS,
337 std::placeholders::_3));
342 ESP_LOGCONFIG(TAG,
" Protocol version: hOn");
343 ESP_LOGCONFIG(TAG,
" Control method: %d", (uint8_t) this->
control_method_);
345 ESP_LOGCONFIG(TAG,
" Device protocol version: %s", this->
hvac_hardware_info_.value().protocol_version_.c_str());
346 ESP_LOGCONFIG(TAG,
" Device software version: %s", this->
hvac_hardware_info_.value().software_version_.c_str());
347 ESP_LOGCONFIG(TAG,
" Device hardware version: %s", this->
hvac_hardware_info_.value().hardware_version_.c_str());
348 ESP_LOGCONFIG(TAG,
" Device name: %s", this->
hvac_hardware_info_.value().device_name_.c_str());
349 ESP_LOGCONFIG(TAG,
" Device features:%s%s%s%s%s",
369 uint8_t module_capabilities[2] = {0b00000000, 0b00000111};
370 static const haier_protocol::HaierMessage DEVICE_VERSION_REQUEST(
371 haier_protocol::FrameType::GET_DEVICE_VERSION, module_capabilities,
sizeof(module_capabilities));
377 static const haier_protocol::HaierMessage DEVICEID_REQUEST(haier_protocol::FrameType::GET_DEVICE_ID);
384 static const haier_protocol::HaierMessage STATUS_REQUEST(
386 static const haier_protocol::HaierMessage BIG_DATA_REQUEST(
400 static const haier_protocol::HaierMessage UPDATE_SIGNAL_REQUEST(
401 haier_protocol::FrameType::GET_MANAGEMENT_INFORMATION);
420 static const haier_protocol::HaierMessage ALARM_STATUS_REQUEST(haier_protocol::FrameType::GET_ALARM_STATUS);
436 ESP_LOGI(TAG,
"AC control is disabled, monitor only");
440 ESP_LOGW(TAG,
"Unsupported control method for hOn protocol!");
446 ESP_LOGW(TAG,
"Control message queue is empty!");
465 ESP_LOGW(TAG,
"SENDING_ACTION_COMMAND phase without action request!");
473 }
else if (std::chrono::duration_cast<std::chrono::milliseconds>(now - this->
last_alarm_request_).count() >
474 ALARM_STATUS_REQUEST_INTERVAL_MS) {
479 (std::chrono::duration_cast<std::chrono::milliseconds>(now - this->
last_signal_request_).count() >
480 SIGNAL_LEVEL_UPDATE_INTERVAL_MS)) {
487 ESP_LOGE(TAG,
"Wrong protocol handler state: %s (%d), resetting communication",
496 static haier_protocol::HaierMessage power_on_message(
498 std::initializer_list<uint8_t>({0x00, 0x01}).begin(), 2);
499 return power_on_message;
501 static haier_protocol::HaierMessage power_off_message(
503 std::initializer_list<uint8_t>({0x00, 0x00}).begin(), 2);
504 return power_off_message;
510 constexpr uint32_t restore_settings_version = 0x57EB59DDUL;
525 uint8_t control_out_buffer[haier_protocol::MAX_FRAME_SIZE];
528 control_out_buffer[4] = 0;
529 bool has_hvac_settings =
false;
531 has_hvac_settings =
true;
536 out_data->ac_power = 0;
539 out_data->ac_power = 1;
544 out_data->ac_power = 1;
549 out_data->ac_power = 1;
554 out_data->ac_power = 1;
558 out_data->fast_mode = 0;
561 out_data->ac_power = 1;
566 ESP_LOGE(
"Control",
"Unsupported climate mode");
587 ESP_LOGE(
"Control",
"Unsupported fan mode");
614 out_data->set_point = ((int) target_temp) - 16;
615 out_data->half_degree = (target_temp - ((int) target_temp) >= 0.49) ? 1 : 0;
617 if (out_data->ac_power == 0) {
619 out_data->fast_mode = 0;
620 out_data->sleep_mode = 0;
624 out_data->fast_mode = 0;
625 out_data->sleep_mode = 0;
626 out_data->ten_degree = 0;
631 out_data->sleep_mode = 0;
632 out_data->ten_degree = 0;
635 out_data->fast_mode = 0;
636 out_data->sleep_mode = 0;
641 out_data->fast_mode = 0;
642 out_data->sleep_mode = 1;
643 out_data->ten_degree = 0;
646 ESP_LOGE(
"Control",
"Unsupported preset");
647 out_data->fast_mode = 0;
648 out_data->sleep_mode = 0;
649 out_data->ten_degree = 0;
666 out_data->quiet_mode = 0;
673 out_data->beeper_status = ((!this->
get_beeper_state()) || (!has_hvac_settings)) ? 1 : 0;
674 control_out_buffer[4] = 0;
679 return haier_protocol::HaierMessage(haier_protocol::FrameType::CONTROL,
685 constexpr
size_t active_alarms_size =
sizeof(this->
active_alarms_);
686 if (size >= active_alarms_size + 2) {
688 size_t alarm_code = 0;
689 for (
int i = active_alarms_size - 1; i >= 0; i--) {
691 uint8_t alarm_bit = 1;
692 for (
int b = 0; b < 8; b++) {
693 if ((packet[2 + i] & alarm_bit) != (this->
active_alarms_[i] & alarm_bit)) {
694 bool alarm_status = (packet[2 + i] & alarm_bit) != 0;
695 int log_level = alarm_status ? ESPHOME_LOG_LEVEL_WARN : ESPHOME_LOG_LEVEL_INFO;
699 esp_log_printf_(log_level, TAG, __LINE__,
"Alarm %s (%d): %s", alarm_status ?
"activated" :
"deactivated",
700 alarm_code, alarm_message);
717 float alarm_count = 0.0f;
718 static uint8_t nibble_bits_count[] = {0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4};
720 alarm_count += (float) (nibble_bits_count[packet[2 + i] & 0x0F] + nibble_bits_count[packet[2 + i] >> 4]);
732 if ((this->
sub_sensors_[(
size_t) type] !=
nullptr) && (sens ==
nullptr)) {
734 }
else if ((this->
sub_sensors_[(
size_t) type] ==
nullptr) && (sens !=
nullptr)) {
744 size_t index = (size_t) type;
752 #ifdef USE_BINARY_SENSOR 766 bool converted_value = value == 1;
767 size_t index = (size_t) type;
773 #endif // USE_BINARY_SENSOR 775 #ifdef USE_TEXT_SENSOR 781 sens->
publish_state(this->hvac_hardware_info_.value().device_name_);
785 sens->
publish_state(this->hvac_hardware_info_.value().protocol_version_);
796 size_t index = (size_t) type;
800 #endif // USE_TEXT_SENSOR 819 size_t expected_size =
821 if (size < expected_size) {
822 ESP_LOGW(TAG,
"Unexpected message size %d (expexted >= %d)", size, expected_size);
823 return haier_protocol::HandlerError::WRONG_MESSAGE_STRUCTURE;
825 uint16_t subtype = (((uint16_t) packet_buffer[0]) << 8) + packet_buffer[1];
844 #ifdef USE_BINARY_SENSOR 852 #endif // USE_BINARY_SENSOR 858 memcpy(&packet.control, packet_buffer + 2 + this->status_message_header_size_,
860 memcpy(&packet.sensors, packet_buffer + 2 + this->status_message_header_size_ + this->real_control_packet_size_,
862 if (packet.sensors.error_status != 0) {
863 ESP_LOGW(TAG,
"HVAC error, code=0x%02X", packet.sensors.error_status);
870 (
float) (packet.sensors.outdoor_temperature + PROTOCOL_OUTDOOR_TEMPERATURE_OFFSET));
876 bool should_publish =
false;
880 if (packet.control.fast_mode != 0) {
882 }
else if (packet.control.sleep_mode != 0) {
884 }
else if (packet.control.ten_degree != 0) {
894 this->
target_temperature = packet.control.set_point + 16.0f + ((packet.control.half_degree == 1) ? 0.5f : 0.0f);
895 should_publish = should_publish || (old_target_temperature != this->
target_temperature);
913 switch (packet.control.fan_mode) {
919 ESP_LOGI(TAG,
"Fan speed Auto is not supported in Fan only AC mode, ignoring");
936 if (packet.control.ac_power != 0) {
938 bool disp_status = packet.control.display_status != 0;
953 should_publish = should_publish || (old_health_mode != this->
get_health_mode());
957 if (packet.control.steri_clean == 1) {
960 }
else if (packet.control.self_cleaning_status == 1) {
968 ESP_LOGD(TAG,
"Cleaning status change: %d => %d", (uint8_t) this->
cleaning_status_, (uint8_t) new_cleaning);
974 this->cleaning_status_ = new_cleaning;
975 #ifdef USE_TEXT_SENSOR 977 #endif // USE_TEXT_SENSOR 983 if (packet.control.ac_power == 0) {
987 switch (packet.control.ac_mode) {
1005 should_publish = should_publish || (old_mode != this->
mode);
1012 bool new_quiet_mode = packet.control.quiet_mode != 0;
1020 #endif // USE_SWITCH 1031 if (horizontal_swing_supported &&
1033 if (vertical_swing_supported &&
1040 if (vertical_swing_supported &&
1055 if (save_settings) {
1060 should_publish = should_publish || (old_swing_mode != this->
swing_mode);
1063 if (should_publish) {
1066 if (should_publish) {
1067 ESP_LOGI(TAG,
"HVAC values changed");
1069 int log_level = should_publish ? ESPHOME_LOG_LEVEL_INFO : ESPHOME_LOG_LEVEL_DEBUG;
1070 esp_log_printf_(log_level, TAG, __LINE__,
"HVAC Mode = 0x%X", packet.control.ac_mode);
1071 esp_log_printf_(log_level, TAG, __LINE__,
"Fan speed Status = 0x%X", packet.control.fan_mode);
1072 esp_log_printf_(log_level, TAG, __LINE__,
"Horizontal Swing Status = 0x%X", packet.control.horizontal_swing_mode);
1073 esp_log_printf_(log_level, TAG, __LINE__,
"Vertical Swing Status = 0x%X", packet.control.vertical_swing_mode);
1074 esp_log_printf_(log_level, TAG, __LINE__,
"Set Point Status = 0x%X", packet.control.set_point);
1075 return haier_protocol::HandlerError::HANDLER_OK;
1102 uint8_t fan_mode_buf[] = {0x00, 0xFF};
1103 uint8_t quiet_mode_buf[] = {0x00, 0xFF};
1105 climate_mode = climate_control.
mode.
value();
1106 uint8_t buffer[2] = {0x00, 0x00};
1125 (uint8_t) hon_protocol::DataParameters::AC_MODE,
1134 (uint8_t) hon_protocol::DataParameters::AC_MODE,
1143 (uint8_t) hon_protocol::DataParameters::AC_MODE,
1152 (uint8_t) hon_protocol::DataParameters::AC_MODE,
1157 ESP_LOGE(
"Control",
"Unsupported climate mode");
1166 new_power ? ONE_BUF : ZERO_BUF, 2);
1170 uint8_t fast_mode_buf[] = {0x00, 0xFF};
1171 uint8_t away_mode_buf[] = {0x00, 0xFF};
1174 fast_mode_buf[1] = 0x00;
1175 away_mode_buf[1] = 0x00;
1179 fast_mode_buf[1] = 0x00;
1180 away_mode_buf[1] = 0x00;
1185 away_mode_buf[1] = 0x00;
1188 fast_mode_buf[1] = 0x00;
1192 ESP_LOGE(
"Control",
"Unsupported preset");
1199 quiet_mode_buf[1] = 0x01;
1201 quiet_mode_buf[1] = 0x00;
1207 if (quiet_mode_buf[1] != 0xFF) {
1228 uint8_t buffer[2] = {0x00, 0x00};
1256 horizontal_swing_buf, 2);
1260 vertical_swing_buf, 2);
1279 ESP_LOGE(
"Control",
"Unsupported fan mode");
1282 if (fan_mode_buf[1] != 0xFF) {
1300 uint8_t control_out_buffer[haier_protocol::MAX_FRAME_SIZE];
1304 out_data->steri_clean = 0;
1305 out_data->set_point = 0x06;
1308 out_data->ac_power = 1;
1310 out_data->light_status = 0;
1317 haier_protocol::HaierMessage(haier_protocol::FrameType::CONTROL,
1328 uint8_t control_out_buffer[haier_protocol::MAX_FRAME_SIZE];
1332 out_data->steri_clean = 1;
1333 out_data->set_point = 0x06;
1336 out_data->ac_power = 1;
1338 out_data->light_status = 0;
1357 if ((sub_sensor !=
nullptr) && sub_sensor->has_state())
1358 sub_sensor->publish_state(NAN);
1360 #endif // USE_SENSOR 1368 static uint8_t counter = 0;
1369 counter = (counter + 1) % 3;
1370 return counter == 1;
HvacSettings current_hvac_settings_
Base class for all switches.
value_type const & value() const
ClimateSwingMode swing_mode
The active swing mode of the climate device.
esphome::optional< hon_protocol::VerticalSwingMode > current_vertical_swing_
bool can_send_message() const
haier_protocol::HaierMessage get_control_message() override
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)
void update_sub_sensor_(SubSensorType type, float value)
SwitchState display_status_
esphome::optional< hon_protocol::VerticalSwingMode > pending_vertical_direction_
esphome::optional< float > target_temperature
hon_protocol::HorizontalSwingMode last_horizontal_swing
CallbackManager< void(uint8_t, const char *)> alarm_start_callback_
int real_sensors_packet_size_
esphome::optional< esphome::climate::ClimatePreset > preset
CallbackManager< void(uint8_t, const char *)> alarm_end_callback_
uint8_t compressor_current[2]
haier_protocol::HandlerError process_status_message_(const uint8_t *packet, uint8_t size)
const std::set< ClimateSwingMode > & get_supported_swing_modes() const
std::unique_ptr< uint8_t[]> last_status_message_
constexpr int PROTOCOL_OUTDOOR_TEMPERATURE_OFFSET
float target_temperature
The target temperature of the climate device.
void add_alarm_end_callback(std::function< void(uint8_t, const char *)> &&callback)
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)
virtual void set_phase(ProtocolPhases phase)
void set_quiet_mode_switch(switch_::Switch *sw)
void control(const esphome::climate::ClimateCall &call) override
void update_sub_text_sensor_(SubTextSensorType type, const std::string &value)
constexpr std::chrono::milliseconds CONTROL_MESSAGE_RETRIES_INTERVAL
uint8_t active_alarms_[8]
std::chrono::steady_clock::time_point last_status_request_
std::chrono::steady_clock::time_point last_signal_request_
ClimateMode mode
The active mode of the climate device.
void set_handlers() override
void set_vertical_airflow(hon_protocol::VerticalSwingMode direction)
bool get_health_mode() const
bool got_valid_outdoor_temp_
float active_alarm_count_
float current_temperature
The current temperature of the climate device, as reported from the integration.
void set_sub_binary_sensor(SubBinarySensorType type, binary_sensor::BinarySensor *sens)
CleaningState cleaning_status_
void publish_state(const std::string &state)
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)
virtual bool prepare_pending_action()
HonControlMethod control_method_
esphome::optional< hon_protocol::HorizontalSwingMode > get_horizontal_airflow() const
esphome::optional< HardwareInfo > hvac_hardware_info_
bool get_quiet_mode_state() const
void set_sub_text_sensor(SubTextSensorType type, text_sensor::TextSensor *sens)
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)
ClimateSwingMode
Enum for all modes a climate swing can be in.
void process_phase(std::chrono::steady_clock::time_point now) override
bool get_display_state() const
void initialization() override
void set_quiet_mode_state(bool state)
void start_self_cleaning()
virtual void save_settings()
esphome::optional< hon_protocol::HorizontalSwingMode > current_horizontal_swing_
haier_protocol::ProtocolHandler haier_protocol_
uint8_t outdoor_fan_status
bool is_protocol_initialisation_interval_exceeded_(std::chrono::steady_clock::time_point now)
void add_alarm_start_callback(std::function< void(uint8_t, const char *)> &&callback)
virtual void initialization()
constexpr size_t HON_ALARM_COUNT
uint8_t self_cleaning_status
void set_beeper_state(bool state)
void send_message_(const haier_protocol::HaierMessage &command, bool use_crc, uint8_t num_repeats=0, std::chrono::milliseconds interval=std::chrono::milliseconds::zero())
ProtocolPhases protocol_phase_
constexpr size_t SIGNAL_LEVEL_UPDATE_INTERVAL_MS
haier_protocol::HaierMessage get_wifi_signal_message_()
int extra_control_packet_bytes_
optional< ClimatePreset > preset
The active preset of the climate device.
void fill_control_messages_queue_()
const char * phase_to_string_(ProtocolPhases phase)
virtual bool has_state() const
Return whether this binary sensor has outputted a state.
const std::set< climate::ClimatePreset > & get_supported_presets() const
ESPPreferences * global_preferences
int real_control_packet_size_
void set_beeper_switch(switch_::Switch *sw)
esphome::optional< hon_protocol::VerticalSwingMode > get_vertical_airflow() const
bool should_get_big_data_()
esphome::optional< hon_protocol::HorizontalSwingMode > pending_horizontal_direction_
CleaningState get_cleaning_status() const
void set_sub_sensor(SubSensorType type, sensor::Sensor *sens)
ESPPreferenceObject hon_rtc_
void clear_control_messages_queue_()
esphome::optional< PendingAction > action_request_
void publish_state(float state)
Publish a new state to the front-end.
sensor::Sensor * sub_sensors_[(size_t) SubSensorType::SUB_SENSOR_TYPE_COUNT]
haier_protocol::HandlerError status_handler_(haier_protocol::FrameType request_type, haier_protocol::FrameType message_type, const uint8_t *data, size_t data_size)
uint8_t outdoor_in_air_temperature
esphome::optional< esphome::climate::ClimateFanMode > fan_mode
uint8_t outdoor_coil_temperature
int status_message_header_size_
constexpr uint16_t encode_uint16(uint8_t msb, uint8_t lsb)
Encode a 16-bit value given the most and least significant byte.
void dump_config() override
void publish_state(bool state)
Publish a new state to the front-end.
switch_::Switch * beeper_switch_
constexpr size_t ALARM_STATUS_REQUEST_INTERVAL_MS
void publish_state()
Publish the state of the climate device, to be called from integrations.
int extra_sensors_packet_bytes_
uint8_t expansion_valve_open_degree[2]
void HOT esp_log_printf_(int level, const char *tag, int line, const char *format,...)
text_sensor::TextSensor * sub_text_sensors_[(size_t) SubTextSensorType::SUB_TEXT_SENSOR_TYPE_COUNT]
ClimateMode
Enum for all modes a climate device can be in.
bool get_beeper_state() const
uint8_t four_way_valve_status
uint8_t outdoor_out_air_temperature
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)
switch_::Switch * quiet_mode_switch_
optional< ClimateFanMode > fan_mode
The active fan mode of the climate device.
uint8_t compressor_status
std::string get_cleaning_status_text() const
void update_sub_binary_sensor_(SubBinarySensorType type, uint8_t value)
virtual void process_protocol_reset()
virtual ESPPreferenceObject make_preference(size_t length, uint32_t type, bool in_flash)=0
SwitchState quiet_mode_state_
uint8_t compressor_frequency
bool is_message_interval_exceeded_(std::chrono::steady_clock::time_point now)
std::chrono::steady_clock::time_point last_alarm_request_
bool is_status_request_interval_exceeded_(std::chrono::steady_clock::time_point now)
haier_protocol::HandlerError alarm_status_message_handler_(haier_protocol::FrameType type, const uint8_t *buffer, size_t size)
Implementation of SPI Controller mode.
bool has_state() const
Return whether this sensor has gotten a full state (that passed through all filters) yet...
Base class for all binary_sensor-type classes.
void process_alarm_message_(const uint8_t *packet, uint8_t size, bool check_new)
void process_protocol_reset() override
uint8_t other_modes_fan_speed_
haier_protocol::HaierMessage get_power_message(bool state) override
Base-class for all sensors.
const std::string HON_ALARM_MESSAGES[]
void set_horizontal_airflow(hon_protocol::HorizontalSwingMode direction)
bool prepare_pending_action() override
void start_steri_cleaning()
constexpr uint8_t CONTROL_MESSAGE_RETRIES
uint8_t indoor_electric_heating_status
void publish_state(bool state)
Publish a state to the front-end from the back-end.
uint8_t indoor_coil_temperature
bool is_control_message_interval_exceeded_(std::chrono::steady_clock::time_point now)
CallbackManager< void(const char *, size_t)> status_message_callback_
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)
std::queue< haier_protocol::HaierMessage > control_messages_queue_
binary_sensor::BinarySensor * sub_binary_sensors_[(size_t) SubBinarySensorType::SUB_BINARY_SENSOR_TYPE_COUNT]
hon_protocol::VerticalSwingMode last_vertiacal_swing
uint32_t get_object_id_hash()
esphome::climate::ClimateTraits traits_
uint8_t indoor_fan_status
bool forced_request_status_
esphome::optional< esphome::climate::ClimateSwingMode > swing_mode
std::chrono::steady_clock::time_point last_valid_status_timestamp_
esphome::optional< esphome::climate::ClimateMode > mode
void dump_config() override