diff --git a/components/haier/haier_base.cpp b/components/haier/haier_base.cpp index f68a2a9..1b6db05 100644 --- a/components/haier/haier_base.cpp +++ b/components/haier/haier_base.cpp @@ -144,11 +144,11 @@ void HaierClimateBase::set_health_mode(bool state) { } } -void HaierClimateBase::send_power_on_command() { this->action_request_ = PendingAction({ActionRequest::TURN_POWER_ON}); } +void HaierClimateBase::send_power_on_command() { this->action_request_ = PendingAction({ActionRequest::TURN_POWER_ON, esphome::optional()}); } -void HaierClimateBase::send_power_off_command() { this->action_request_ = PendingAction({ActionRequest::TURN_POWER_OFF}); } +void HaierClimateBase::send_power_off_command() { this->action_request_ = PendingAction({ActionRequest::TURN_POWER_OFF, esphome::optional()}); } -void HaierClimateBase::toggle_power() { this->action_request_ = PendingAction({ActionRequest::TOGGLE_POWER}); } +void HaierClimateBase::toggle_power() { this->action_request_ = PendingAction({ActionRequest::TOGGLE_POWER, esphome::optional()}); } void HaierClimateBase::set_supported_swing_modes(const std::set &modes) { this->traits_.set_supported_swing_modes(modes); diff --git a/components/haier/hon_climate.cpp b/components/haier/hon_climate.cpp index e06c13c..cd52ece 100644 --- a/components/haier/hon_climate.cpp +++ b/components/haier/hon_climate.cpp @@ -97,14 +97,14 @@ CleaningState HonClimate::get_cleaning_status() const { return this->cleaning_st void HonClimate::start_self_cleaning() { if (this->cleaning_status_ == CleaningState::NO_CLEANING) { ESP_LOGI(TAG, "Sending self cleaning start request"); - this->action_request_= PendingAction({ActionRequest::START_SELF_CLEAN}); + this->action_request_= PendingAction({ActionRequest::START_SELF_CLEAN, esphome::optional()}); } } void HonClimate::start_steri_cleaning() { if (this->cleaning_status_ == CleaningState::NO_CLEANING) { ESP_LOGI(TAG, "Sending steri cleaning start request"); - this->action_request_ = PendingAction({ActionRequest::START_STERI_CLEAN}); + this->action_request_ = PendingAction({ActionRequest::START_STERI_CLEAN, esphome::optional()}); } } @@ -212,6 +212,8 @@ haier_protocol::HandlerError HonClimate::status_handler_(haier_protocol::FrameTy this->set_phase(ProtocolPhases::SENDING_CONTROL); } break; + default: + break; } } return result; @@ -710,7 +712,7 @@ haier_protocol::HandlerError HonClimate::process_status_message_(const uint8_t * ESP_LOGD(TAG, "Cleaning status change: %d => %d", (uint8_t) this->cleaning_status_, (uint8_t) new_cleaning); if (new_cleaning == CleaningState::NO_CLEANING) { // Turning AC off after cleaning - this->action_request_ = PendingAction({ActionRequest::TURN_POWER_OFF}); + this->action_request_ = PendingAction({ActionRequest::TURN_POWER_OFF, esphome::optional()}); } this->cleaning_status_ = new_cleaning; } diff --git a/components/haier/smartair2_climate.cpp b/components/haier/smartair2_climate.cpp index d070d84..3896b1f 100644 --- a/components/haier/smartair2_climate.cpp +++ b/components/haier/smartair2_climate.cpp @@ -58,6 +58,8 @@ haier_protocol::HandlerError Smartair2Climate::status_handler_(haier_protocol::F if (this->current_hvac_settings_.valid) this->current_hvac_settings_.reset(); break; + default: + break; } } return result;