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); }