From 7b9ac3f249842ce3f502495686034262d2a7853e Mon Sep 17 00:00:00 2001 From: I-am-nightingale Date: Thu, 11 Apr 2024 21:24:12 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9F=D0=BE=D0=B4=D0=BF=D1=80=D0=B0=D0=B2?= =?UTF-8?q?=D0=B8=D0=BB=20=D1=84=D0=B0=D0=B9=D0=BB=20=D0=BA=D0=BE=D0=BD?= =?UTF-8?q?=D1=84=D0=B8=D0=B3=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/core.yaml | 31 ++++++++++++++++++------------- 1 file changed, 18 insertions(+), 13 deletions(-) diff --git a/packages/core.yaml b/packages/core.yaml index 7b17d08..95f95ff 100644 --- a/packages/core.yaml +++ b/packages/core.yaml @@ -34,7 +34,12 @@ esphome: } else { id(${device_name}climate).set_module_display_state(false); } - + if (id(force_mode).state){ + id(${device_name}climate).set_force_mode_state(true); + } else { + id(${device_name}climate).set_force_mode_state(false); + } + if (id(vswing).active_index() == 0){ id(${device_name}climate).set_vertical_swing_direction(esphome::tclac::VerticalSwingDirection::UP_DOWN); } else if (id(vswing).active_index() == 1){ @@ -67,17 +72,17 @@ esphome: id(${device_name}climate).set_vertical_airflow(esphome::tclac::AirflowVerticalDirection::MAX_DOWN); } - if (id(vswing).active_index() == 0){ + if (id(hfixing).active_index() == 0){ id(${device_name}climate).set_horizontal_airflow(esphome::tclac::AirflowHorizontalDirection::LAST); - } else if (id(vswing).active_index() == 1){ + } else if (id(hfixing).active_index() == 1){ id(${device_name}climate).set_horizontal_airflow(esphome::tclac::AirflowHorizontalDirection::MAX_LEFT); - } else if (id(vswing).active_index() == 2){ + } else if (id(hfixing).active_index() == 2){ id(${device_name}climate).set_horizontal_airflow(esphome::tclac::AirflowHorizontalDirection::LEFT); - } else if (id(vswing).active_index() == 3){ + } else if (id(hfixing).active_index() == 3){ id(${device_name}climate).set_horizontal_airflow(esphome::tclac::AirflowHorizontalDirection::CENTER); - } else if (id(vswing).active_index() == 4){ + } else if (id(hfixing).active_index() == 4){ id(${device_name}climate).set_horizontal_airflow(esphome::tclac::AirflowHorizontalDirection::RIGHT); - } else if (id(vswing).active_index() == 5){ + } else if (id(hfixing).active_index() == 5){ id(${device_name}climate).set_horizontal_airflow(esphome::tclac::AirflowHorizontalDirection::MAX_RIGHT); } @@ -282,17 +287,17 @@ select: set_action: then: lambda: !lambda |- - if (id(vswing).active_index() == 0){ + if (id(hfixing).active_index() == 0){ id(${device_name}climate).set_horizontal_airflow(esphome::tclac::AirflowHorizontalDirection::LAST); - } else if (id(vswing).active_index() == 1){ + } else if (id(hfixing).active_index() == 1){ id(${device_name}climate).set_horizontal_airflow(esphome::tclac::AirflowHorizontalDirection::MAX_LEFT); - } else if (id(vswing).active_index() == 2){ + } else if (id(hfixing).active_index() == 2){ id(${device_name}climate).set_horizontal_airflow(esphome::tclac::AirflowHorizontalDirection::LEFT); - } else if (id(vswing).active_index() == 3){ + } else if (id(hfixing).active_index() == 3){ id(${device_name}climate).set_horizontal_airflow(esphome::tclac::AirflowHorizontalDirection::CENTER); - } else if (id(vswing).active_index() == 4){ + } else if (id(hfixing).active_index() == 4){ id(${device_name}climate).set_horizontal_airflow(esphome::tclac::AirflowHorizontalDirection::RIGHT); - } else if (id(vswing).active_index() == 5){ + } else if (id(hfixing).active_index() == 5){ id(${device_name}climate).set_horizontal_airflow(esphome::tclac::AirflowHorizontalDirection::MAX_RIGHT); }