From b1a9713a34f158a8ba7e5942ca90d10359e9a657 Mon Sep 17 00:00:00 2001 From: Pavlo Dudnytskyi Date: Thu, 25 Apr 2024 07:15:16 +0200 Subject: [PATCH] Removing not working options for swing modes --- components/haier/hon_packet.h | 7 ++----- configs/select/airflow_horizontal.yaml | 10 ---------- configs/select/airflow_vertical.yaml | 1 - 3 files changed, 2 insertions(+), 16 deletions(-) diff --git a/components/haier/hon_packet.h b/components/haier/hon_packet.h index a7adec6..c4811c7 100644 --- a/components/haier/hon_packet.h +++ b/components/haier/hon_packet.h @@ -9,12 +9,11 @@ namespace hon_protocol { enum class VerticalSwingMode : uint8_t { HEALTH_UP = 0x01, MAX_UP = 0x02, - MAX_UP_2 = 0x00, HEALTH_DOWN = 0x03, UP = 0x04, CENTER = 0x06, - DOWN = 0x0A, - MAX_DOWN = 0x08, + DOWN = 0x08, + MAX_DOWN = 0x0A, AUTO = 0x0C, // Auto for special modes AUTO_SPECIAL = 0x0E, @@ -22,8 +21,6 @@ enum class VerticalSwingMode : uint8_t { enum class HorizontalSwingMode : uint8_t { CENTER = 0x00, - TEST_01 = 0x01, - TEST_02 = 0x02, MAX_LEFT = 0x03, LEFT = 0x04, RIGHT = 0x05, diff --git a/configs/select/airflow_horizontal.yaml b/configs/select/airflow_horizontal.yaml index bbde3a9..8749118 100644 --- a/configs/select/airflow_horizontal.yaml +++ b/configs/select/airflow_horizontal.yaml @@ -12,8 +12,6 @@ select: - Right - Max Right - Auto - - Test 01 - - Test 02 lambda: >- switch (id(${device_id}).get_horizontal_airflow().value_or(esphome::haier::hon_protocol::HorizontalSwingMode::CENTER)) { @@ -30,10 +28,6 @@ select: return std::string("Max Right"); case esphome::haier::hon_protocol::HorizontalSwingMode::AUTO: return std::string("Auto"); - case esphome::haier::hon_protocol::HorizontalSwingMode::TEST_01: - return std::string("Test 01"); - case esphome::haier::hon_protocol::HorizontalSwingMode::TEST_02: - return std::string("Test 02"); } set_action: - climate.haier.set_horizontal_airflow: @@ -49,9 +43,5 @@ select: return esphome::haier::hon_protocol::HorizontalSwingMode::MAX_RIGHT; else if (x == "Auto") return esphome::haier::hon_protocol::HorizontalSwingMode::AUTO; - else if (x == "Test 01") - return esphome::haier::hon_protocol::HorizontalSwingMode::TEST_01; - else if (x == "Test 02") - return esphome::haier::hon_protocol::HorizontalSwingMode::TEST_02; else return esphome::haier::hon_protocol::HorizontalSwingMode::CENTER; diff --git a/configs/select/airflow_vertical.yaml b/configs/select/airflow_vertical.yaml index 3f7d6aa..7ec6b94 100644 --- a/configs/select/airflow_vertical.yaml +++ b/configs/select/airflow_vertical.yaml @@ -20,7 +20,6 @@ select: case esphome::haier::hon_protocol::VerticalSwingMode::HEALTH_UP: return std::string("Health Up"); case esphome::haier::hon_protocol::VerticalSwingMode::MAX_UP: - case esphome::haier::hon_protocol::VerticalSwingMode::MAX_UP_2: return std::string("Max Up"); case esphome::haier::hon_protocol::VerticalSwingMode::UP: return std::string("Up");