From 655aa35375512a2c340801949a27066247eb89f3 Mon Sep 17 00:00:00 2001 From: Pavlo Dudnytskyi Date: Tue, 30 Jul 2024 13:55:14 +0200 Subject: [PATCH] Documentation updated to align with latest changes --- README.rst | 6 +- configs/climate/haier_hon.yaml | 2 +- docs/esphome-docs/climate/haier.rst | 6 +- docs/examples/max-hon.yaml | 2 +- docs/examples/min-hon.yaml | 2 +- docs/faq.rst | 4 - docs/hon_example.rst | 614 ++++++++++++++-------------- docs/smartair2_example.rst | 192 ++++----- tests/.simple-hon.yaml | 2 +- 9 files changed, 413 insertions(+), 417 deletions(-) diff --git a/README.rst b/README.rst index df23143..a6c7d25 100644 --- a/README.rst +++ b/README.rst @@ -143,7 +143,7 @@ This automation will be triggered when a new alarm is activated by AC. The error .. code-block:: yaml climate: - - protocol: hOn + - protocol: hon on_alarm_start: then: - logger.log: @@ -161,7 +161,7 @@ This automation will be triggered when a previously activated alarm is deactivat .. code-block:: yaml climate: - - protocol: hOn + - protocol: hon on_alarm_end: then: - logger.log: @@ -180,7 +180,7 @@ This trigger can be used to support some features that unique for the model and .. code-block:: yaml climate: - - protocol: hOn + - protocol: hon on_status_message: then: - logger.log: diff --git a/configs/climate/haier_hon.yaml b/configs/climate/haier_hon.yaml index 1319e90..9b704df 100644 --- a/configs/climate/haier_hon.yaml +++ b/configs/climate/haier_hon.yaml @@ -1,7 +1,7 @@ climate: - platform: haier id: ${device_id} - protocol: hOn + protocol: hon name: ${device_name} uart_id: ${uart_id} wifi_signal: ${send_wifi} # Optional, default true, enables WiFI signal transmission from ESP to AC diff --git a/docs/esphome-docs/climate/haier.rst b/docs/esphome-docs/climate/haier.rst index be29f54..60369e4 100644 --- a/docs/esphome-docs/climate/haier.rst +++ b/docs/esphome-docs/climate/haier.rst @@ -145,7 +145,7 @@ This automation will be triggered when a new alarm is activated by AC. The error .. code-block:: yaml climate: - - protocol: hOn + - protocol: hon on_alarm_start: then: - logger.log: @@ -163,7 +163,7 @@ This automation will be triggered when a previously activated alarm is deactivat .. code-block:: yaml climate: - - protocol: hOn + - protocol: hon on_alarm_end: then: - logger.log: @@ -182,7 +182,7 @@ This trigger can be used to support some features that unique for the model and .. code-block:: yaml climate: - - protocol: hOn + - protocol: hon on_status_message: then: - logger.log: diff --git a/docs/examples/max-hon.yaml b/docs/examples/max-hon.yaml index dde1b4e..4279ad8 100644 --- a/docs/examples/max-hon.yaml +++ b/docs/examples/max-hon.yaml @@ -16,7 +16,7 @@ api: climate: - platform: haier id: haier_ac - protocol: hOn + protocol: hon name: Haier hOn Climate uart_id: haier_uart wifi_signal: true diff --git a/docs/examples/min-hon.yaml b/docs/examples/min-hon.yaml index 4eece63..051df33 100644 --- a/docs/examples/min-hon.yaml +++ b/docs/examples/min-hon.yaml @@ -5,5 +5,5 @@ uart: climate: - platform: haier - protocol: hOn + protocol: hon name: Haier hOn Climate diff --git a/docs/faq.rst b/docs/faq.rst index c44cc6b..c1160be 100644 --- a/docs/faq.rst +++ b/docs/faq.rst @@ -67,10 +67,6 @@ Currently, the `M5Stack AtomS3U `_ an This configuration is a starting point for integrating your Haier AC with an ESP32-S3 based board. -<<<<<<< HEAD -======= - ->>>>>>> f04cca5 (FAQ updated) Troubleshooting --------------- diff --git a/docs/hon_example.rst b/docs/hon_example.rst index 78d7c30..c6502a9 100644 --- a/docs/hon_example.rst +++ b/docs/hon_example.rst @@ -1,307 +1,307 @@ -.. This file is automatically generated by ./docs/script/make_doc.py Python script. - Please, don't change. In case you need to make corrections or changes change - source documentation in ./doc folder or script. - -Example of climate configuration for hOn protocol -================================================= - -Configuration of your climate will depend on capabilities specific model. - -Minimal configuration will look like this: - -.. code-block:: yaml - - uart: - baud_rate: 9600 - tx_pin: 17 - rx_pin: 16 - - climate: - - platform: haier - protocol: hOn - name: Haier hOn Climate - - -Maximum configuration witch will use all possible options will look like this: - -.. code-block:: yaml - - uart: - baud_rate: 9600 - tx_pin: 17 - rx_pin: 16 - id: haier_uart - - api: - services: - - service: turn_on - then: - - climate.haier.power_on: haier_ac - - service: turn_off - then: - - climate.haier.power_off: haier_ac - - climate: - - platform: haier - id: haier_ac - protocol: hOn - name: Haier hOn Climate - uart_id: haier_uart - wifi_signal: true - beeper: true - visual: - min_temperature: 16 °C - max_temperature: 30 °C - temperature_step: - target_temperature: 1 - current_temperature: 0.5 - supported_modes: - - 'OFF' - - HEAT_COOL - - COOL - - HEAT - - DRY - - FAN_ONLY - supported_swing_modes: - - 'OFF' - - VERTICAL - - HORIZONTAL - - BOTH - supported_presets: - - ECO - - BOOST - - SLEEP - on_alarm_start: - then: - - homeassistant.service: - service: logbook.log - data: - domain: climate - name: Haier hOn Climate - data_template: - message: "Alarm activated ({{ alarm_code }}): {{alarm_message}}" - variables: - alarm_message: !lambda "return message;" - alarm_code: !lambda "return code;" - - homeassistant.service: - service: notify.persistent_notification - data: - title: "Haier hOn Climate: alarm activated" - data_template: - message: "Code: {{ alarm_code }}, message: \"{{ alarm_message }}\"" - variables: - alarm_message: !lambda "return message;" - alarm_code: !lambda "return code;" - on_alarm_end: - then: - - homeassistant.service: - service: logbook.log - data: - domain: climate - name: Haier hOn Climate - data_template: - message: "Alarm deactivated ({{ alarm_code }}): {{alarm_message}}" - variables: - alarm_message: !lambda "return message;" - alarm_code: !lambda "return code;" - - button: - - platform: haier - haier_id: haier_ac - self_cleaning: - name: Haier hOn Climate start self cleaning - steri_cleaning: - name: Haier hOn Climate start 56°C steri-cleaning - - text_sensor: - - platform: haier - haier_id: haier_ac - cleaning_status: - name: Haier hOn Climate cleaning status - protocol_version: - name: Haier hOn Climate protocol version - - switch: - - platform: template - id: haier_ac_beeper_switch - entity_category: config - name: Haier hOn Climate beeper - icon: mdi:volume-high - restore_mode: RESTORE_DEFAULT_ON - lambda: |- - return id(haier_ac).get_beeper_state(); - turn_on_action: - climate.haier.beeper_on: haier_ac - turn_off_action: - climate.haier.beeper_off: haier_ac - - platform: template - id: haier_ac_health_mode - name: Haier hOn Climate health mode - icon: mdi:leaf - restore_mode: RESTORE_DEFAULT_OFF - lambda: |- - return id(haier_ac).get_health_mode(); - turn_on_action: - climate.haier.health_on: haier_ac - turn_off_action: - climate.haier.health_off: haier_ac - - platform: template - id: haier_ac_display_switch - name: Haier hOn Climate display - icon: mdi:led-on - entity_category: config - restore_mode: RESTORE_DEFAULT_ON - lambda: |- - return id(haier_ac).get_display_state(); - turn_on_action: - climate.haier.display_on: haier_ac - turn_off_action: - climate.haier.display_off: haier_ac - - select: - - platform: template - id: haier_ac_vertical_direction - name: Haier hOn Climate airflow vertical - entity_category: config - icon: mdi:arrow-expand-vertical - update_interval: 5s - options: - - Health Up - - Max Up - - Up - - Center - - Down - - Max Down - - Health Down - - Auto - lambda: >- - switch (id(haier_ac).get_vertical_airflow().value_or(esphome::haier::hon_protocol::VerticalSwingMode::CENTER)) - { - case esphome::haier::hon_protocol::VerticalSwingMode::HEALTH_UP: - return std::string("Health Up"); - case esphome::haier::hon_protocol::VerticalSwingMode::MAX_UP: - return std::string("Max Up"); - case esphome::haier::hon_protocol::VerticalSwingMode::UP: - return std::string("Up"); - default: - case esphome::haier::hon_protocol::VerticalSwingMode::CENTER: - return std::string("Center"); - case esphome::haier::hon_protocol::VerticalSwingMode::DOWN: - return std::string("Down"); - case esphome::haier::hon_protocol::VerticalSwingMode::MAX_DOWN: - return std::string("Max Down"); - case esphome::haier::hon_protocol::VerticalSwingMode::HEALTH_DOWN: - return std::string("Health Down"); - case esphome::haier::hon_protocol::VerticalSwingMode::AUTO: - case esphome::haier::hon_protocol::VerticalSwingMode::AUTO_SPECIAL: - return std::string("Auto"); - } - set_action: - - climate.haier.set_vertical_airflow: - id: haier_ac - vertical_airflow: !lambda >- - if (x == "Health Up") - return esphome::haier::hon_protocol::VerticalSwingMode::HEALTH_UP; - else if (x == "Max Up") - return esphome::haier::hon_protocol::VerticalSwingMode::MAX_UP; - else if (x == "Up") - return esphome::haier::hon_protocol::VerticalSwingMode::UP; - else if (x == "Down") - return esphome::haier::hon_protocol::VerticalSwingMode::DOWN; - else if (x == "Max Down") - return esphome::haier::hon_protocol::VerticalSwingMode::MAX_DOWN; - else if (x == "Health Down") - return esphome::haier::hon_protocol::VerticalSwingMode::HEALTH_DOWN; - else if (x == "Auto") - return esphome::haier::hon_protocol::VerticalSwingMode::AUTO; - else - return esphome::haier::hon_protocol::VerticalSwingMode::CENTER; - - platform: template - id: haier_ac_horizontal_direction - name: Haier hOn Climate airflow horizontal - entity_category: config - icon: mdi:arrow-expand-horizontal - update_interval: 5s - options: - - Max Left - - Left - - Center - - Right - - Max Right - - Auto - lambda: >- - switch (id(haier_ac).get_horizontal_airflow().value_or(esphome::haier::hon_protocol::HorizontalSwingMode::CENTER)) - { - case esphome::haier::hon_protocol::HorizontalSwingMode::MAX_LEFT: - return std::string("Max Left"); - case esphome::haier::hon_protocol::HorizontalSwingMode::LEFT: - return std::string("Left"); - default: - case esphome::haier::hon_protocol::HorizontalSwingMode::CENTER: - return std::string("Center"); - case esphome::haier::hon_protocol::HorizontalSwingMode::RIGHT: - return std::string("Right"); - case esphome::haier::hon_protocol::HorizontalSwingMode::MAX_RIGHT: - return std::string("Max Right"); - case esphome::haier::hon_protocol::HorizontalSwingMode::AUTO: - return std::string("Auto"); - } - set_action: - - climate.haier.set_horizontal_airflow: - id: haier_ac - horizontal_airflow: !lambda >- - if (x == "Max Left") - return esphome::haier::hon_protocol::HorizontalSwingMode::MAX_LEFT; - else if (x == "Left") - return esphome::haier::hon_protocol::HorizontalSwingMode::LEFT; - else if (x == "Right") - return esphome::haier::hon_protocol::HorizontalSwingMode::RIGHT; - else if (x == "Max Right") - return esphome::haier::hon_protocol::HorizontalSwingMode::MAX_RIGHT; - else if (x == "Auto") - return esphome::haier::hon_protocol::HorizontalSwingMode::AUTO; - else - return esphome::haier::hon_protocol::HorizontalSwingMode::CENTER; - - sensor: - - platform: haier - haier_id: haier_ac - compressor_current: - name: Haier hOn Climate Compressor Current - compressor_frequency: - name: Haier hOn Climate Compressor Frequency - expansion_valve_open_degree: - name: Haier hOn Climate Expansion Valve Open Degree - humidity: - name: Haier hOn Climate Indoor Humidity - indoor_coil_temperature: - name: Haier hOn Climate Indoor Coil Temperature - outdoor_coil_temperature: - name: Haier hOn Climate Outdoor Coil Temperature - outdoor_defrost_temperature: - name: Haier hOn Climate Outdoor Defrost Temperature - outdoor_in_air_temperature: - name: Haier hOn Climate Outdoor In Air Temperature - outdoor_out_air_temperature: - name: Haier hOn Climate Outdoor Out Air Temperature - outdoor_temperature: - name: Haier hOn Climate outdoor temperature - power: - name: Haier hOn Climate Power - - binary_sensor: - - platform: haier - haier_id: haier_ac - compressor_status: - name: Haier hOn Climate Compressor Status - defrost_status: - name: Haier hOn Climate Defrost Status - four_way_valve_status: - name: Haier hOn Climate Four-way Valve Status - indoor_electric_heating_status: - name: Haier hOn Climate Indoor Electric Heating Status - indoor_fan_status: - name: Haier hOn Climate Indoor Fan Status - outdoor_fan_status: - name: Haier hOn Climate Outdoor Fan Status - +.. This file is automatically generated by ./docs/script/make_doc.py Python script. + Please, don't change. In case you need to make corrections or changes change + source documentation in ./doc folder or script. + +Example of climate configuration for hOn protocol +================================================= + +Configuration of your climate will depend on capabilities specific model. + +Minimal configuration will look like this: + +.. code-block:: yaml + + uart: + baud_rate: 9600 + tx_pin: 17 + rx_pin: 16 + + climate: + - platform: haier + protocol: hon + name: Haier hOn Climate + + +Maximum configuration witch will use all possible options will look like this: + +.. code-block:: yaml + + uart: + baud_rate: 9600 + tx_pin: 17 + rx_pin: 16 + id: haier_uart + + api: + services: + - service: turn_on + then: + - climate.haier.power_on: haier_ac + - service: turn_off + then: + - climate.haier.power_off: haier_ac + + climate: + - platform: haier + id: haier_ac + protocol: hon + name: Haier hOn Climate + uart_id: haier_uart + wifi_signal: true + beeper: true + visual: + min_temperature: 16 °C + max_temperature: 30 °C + temperature_step: + target_temperature: 1 + current_temperature: 0.5 + supported_modes: + - 'OFF' + - HEAT_COOL + - COOL + - HEAT + - DRY + - FAN_ONLY + supported_swing_modes: + - 'OFF' + - VERTICAL + - HORIZONTAL + - BOTH + supported_presets: + - ECO + - BOOST + - SLEEP + on_alarm_start: + then: + - homeassistant.service: + service: logbook.log + data: + domain: climate + name: Haier hOn Climate + data_template: + message: "Alarm activated ({{ alarm_code }}): {{alarm_message}}" + variables: + alarm_message: !lambda "return message;" + alarm_code: !lambda "return code;" + - homeassistant.service: + service: notify.persistent_notification + data: + title: "Haier hOn Climate: alarm activated" + data_template: + message: "Code: {{ alarm_code }}, message: \"{{ alarm_message }}\"" + variables: + alarm_message: !lambda "return message;" + alarm_code: !lambda "return code;" + on_alarm_end: + then: + - homeassistant.service: + service: logbook.log + data: + domain: climate + name: Haier hOn Climate + data_template: + message: "Alarm deactivated ({{ alarm_code }}): {{alarm_message}}" + variables: + alarm_message: !lambda "return message;" + alarm_code: !lambda "return code;" + + button: + - platform: haier + haier_id: haier_ac + self_cleaning: + name: Haier hOn Climate start self cleaning + steri_cleaning: + name: Haier hOn Climate start 56°C steri-cleaning + + text_sensor: + - platform: haier + haier_id: haier_ac + cleaning_status: + name: Haier hOn Climate cleaning status + protocol_version: + name: Haier hOn Climate protocol version + + switch: + - platform: template + id: haier_ac_beeper_switch + entity_category: config + name: Haier hOn Climate beeper + icon: mdi:volume-high + restore_mode: RESTORE_DEFAULT_ON + lambda: |- + return id(haier_ac).get_beeper_state(); + turn_on_action: + climate.haier.beeper_on: haier_ac + turn_off_action: + climate.haier.beeper_off: haier_ac + - platform: template + id: haier_ac_health_mode + name: Haier hOn Climate health mode + icon: mdi:leaf + restore_mode: RESTORE_DEFAULT_OFF + lambda: |- + return id(haier_ac).get_health_mode(); + turn_on_action: + climate.haier.health_on: haier_ac + turn_off_action: + climate.haier.health_off: haier_ac + - platform: template + id: haier_ac_display_switch + name: Haier hOn Climate display + icon: mdi:led-on + entity_category: config + restore_mode: RESTORE_DEFAULT_ON + lambda: |- + return id(haier_ac).get_display_state(); + turn_on_action: + climate.haier.display_on: haier_ac + turn_off_action: + climate.haier.display_off: haier_ac + + select: + - platform: template + id: haier_ac_vertical_direction + name: Haier hOn Climate airflow vertical + entity_category: config + icon: mdi:arrow-expand-vertical + update_interval: 5s + options: + - Health Up + - Max Up + - Up + - Center + - Down + - Max Down + - Health Down + - Auto + lambda: >- + switch (id(haier_ac).get_vertical_airflow().value_or(esphome::haier::hon_protocol::VerticalSwingMode::CENTER)) + { + case esphome::haier::hon_protocol::VerticalSwingMode::HEALTH_UP: + return std::string("Health Up"); + case esphome::haier::hon_protocol::VerticalSwingMode::MAX_UP: + return std::string("Max Up"); + case esphome::haier::hon_protocol::VerticalSwingMode::UP: + return std::string("Up"); + default: + case esphome::haier::hon_protocol::VerticalSwingMode::CENTER: + return std::string("Center"); + case esphome::haier::hon_protocol::VerticalSwingMode::DOWN: + return std::string("Down"); + case esphome::haier::hon_protocol::VerticalSwingMode::MAX_DOWN: + return std::string("Max Down"); + case esphome::haier::hon_protocol::VerticalSwingMode::HEALTH_DOWN: + return std::string("Health Down"); + case esphome::haier::hon_protocol::VerticalSwingMode::AUTO: + case esphome::haier::hon_protocol::VerticalSwingMode::AUTO_SPECIAL: + return std::string("Auto"); + } + set_action: + - climate.haier.set_vertical_airflow: + id: haier_ac + vertical_airflow: !lambda >- + if (x == "Health Up") + return esphome::haier::hon_protocol::VerticalSwingMode::HEALTH_UP; + else if (x == "Max Up") + return esphome::haier::hon_protocol::VerticalSwingMode::MAX_UP; + else if (x == "Up") + return esphome::haier::hon_protocol::VerticalSwingMode::UP; + else if (x == "Down") + return esphome::haier::hon_protocol::VerticalSwingMode::DOWN; + else if (x == "Max Down") + return esphome::haier::hon_protocol::VerticalSwingMode::MAX_DOWN; + else if (x == "Health Down") + return esphome::haier::hon_protocol::VerticalSwingMode::HEALTH_DOWN; + else if (x == "Auto") + return esphome::haier::hon_protocol::VerticalSwingMode::AUTO; + else + return esphome::haier::hon_protocol::VerticalSwingMode::CENTER; + - platform: template + id: haier_ac_horizontal_direction + name: Haier hOn Climate airflow horizontal + entity_category: config + icon: mdi:arrow-expand-horizontal + update_interval: 5s + options: + - Max Left + - Left + - Center + - Right + - Max Right + - Auto + lambda: >- + switch (id(haier_ac).get_horizontal_airflow().value_or(esphome::haier::hon_protocol::HorizontalSwingMode::CENTER)) + { + case esphome::haier::hon_protocol::HorizontalSwingMode::MAX_LEFT: + return std::string("Max Left"); + case esphome::haier::hon_protocol::HorizontalSwingMode::LEFT: + return std::string("Left"); + default: + case esphome::haier::hon_protocol::HorizontalSwingMode::CENTER: + return std::string("Center"); + case esphome::haier::hon_protocol::HorizontalSwingMode::RIGHT: + return std::string("Right"); + case esphome::haier::hon_protocol::HorizontalSwingMode::MAX_RIGHT: + return std::string("Max Right"); + case esphome::haier::hon_protocol::HorizontalSwingMode::AUTO: + return std::string("Auto"); + } + set_action: + - climate.haier.set_horizontal_airflow: + id: haier_ac + horizontal_airflow: !lambda >- + if (x == "Max Left") + return esphome::haier::hon_protocol::HorizontalSwingMode::MAX_LEFT; + else if (x == "Left") + return esphome::haier::hon_protocol::HorizontalSwingMode::LEFT; + else if (x == "Right") + return esphome::haier::hon_protocol::HorizontalSwingMode::RIGHT; + else if (x == "Max Right") + return esphome::haier::hon_protocol::HorizontalSwingMode::MAX_RIGHT; + else if (x == "Auto") + return esphome::haier::hon_protocol::HorizontalSwingMode::AUTO; + else + return esphome::haier::hon_protocol::HorizontalSwingMode::CENTER; + + sensor: + - platform: haier + haier_id: haier_ac + compressor_current: + name: Haier hOn Climate Compressor Current + compressor_frequency: + name: Haier hOn Climate Compressor Frequency + expansion_valve_open_degree: + name: Haier hOn Climate Expansion Valve Open Degree + humidity: + name: Haier hOn Climate Indoor Humidity + indoor_coil_temperature: + name: Haier hOn Climate Indoor Coil Temperature + outdoor_coil_temperature: + name: Haier hOn Climate Outdoor Coil Temperature + outdoor_defrost_temperature: + name: Haier hOn Climate Outdoor Defrost Temperature + outdoor_in_air_temperature: + name: Haier hOn Climate Outdoor In Air Temperature + outdoor_out_air_temperature: + name: Haier hOn Climate Outdoor Out Air Temperature + outdoor_temperature: + name: Haier hOn Climate outdoor temperature + power: + name: Haier hOn Climate Power + + binary_sensor: + - platform: haier + haier_id: haier_ac + compressor_status: + name: Haier hOn Climate Compressor Status + defrost_status: + name: Haier hOn Climate Defrost Status + four_way_valve_status: + name: Haier hOn Climate Four-way Valve Status + indoor_electric_heating_status: + name: Haier hOn Climate Indoor Electric Heating Status + indoor_fan_status: + name: Haier hOn Climate Indoor Fan Status + outdoor_fan_status: + name: Haier hOn Climate Outdoor Fan Status + diff --git a/docs/smartair2_example.rst b/docs/smartair2_example.rst index 4e371c5..9ebc24a 100644 --- a/docs/smartair2_example.rst +++ b/docs/smartair2_example.rst @@ -1,96 +1,96 @@ -.. This file is automatically generated by ./docs/script/make_doc.py Python script. - Please, don't change. In case you need to make corrections or changes change - source documentation in ./doc folder or script. - -Example of climate configuration for smartair2 protocol -======================================================= - -Configuration of your climate will depend on capabilities specific model. - -Minimal configuration will look like this: - -.. code-block:: yaml - - uart: - baud_rate: 9600 - tx_pin: 17 - rx_pin: 16 - - climate: - - platform: haier - name: Haier hOn Climate - - -Maximum configuration witch will use all possible options will look like this: - -.. code-block:: yaml - - uart: - baud_rate: 9600 - tx_pin: 17 - rx_pin: 16 - id: haier_uart - - api: - services: - - service: turn_on - then: - - climate.haier.power_on: haier_ac - - service: turn_off - then: - - climate.haier.power_off: haier_ac - - climate: - - platform: haier - id: haier_ac - protocol: smartAir2 - name: Haier SmartAir2 Climate - uart_id: haier_uart - alternative_swing_control: false - wifi_signal: true - visual: - min_temperature: 16 °C - max_temperature: 30 °C - temperature_step: 1 °C - supported_modes: - - 'OFF' - - HEAT_COOL - - COOL - - HEAT - - DRY - - FAN_ONLY - supported_swing_modes: - - 'OFF' - - VERTICAL - - HORIZONTAL - - BOTH - supported_presets: - - BOOST - - COMFORT - - AWAY - - switch: - - platform: template - id: haier_ac_health_mode - name: Haier SmartAir2 Climate health mode - icon: mdi:leaf - restore_mode: RESTORE_DEFAULT_OFF - lambda: |- - return id(haier_ac).get_health_mode(); - turn_on_action: - climate.haier.health_on: haier_ac - turn_off_action: - climate.haier.health_off: haier_ac - - platform: template - id: haier_ac_display_switch - name: Haier SmartAir2 Climate display - icon: mdi:led-on - entity_category: config - restore_mode: RESTORE_DEFAULT_ON - lambda: |- - return id(haier_ac).get_display_state(); - turn_on_action: - climate.haier.display_on: haier_ac - turn_off_action: - climate.haier.display_off: haier_ac - +.. This file is automatically generated by ./docs/script/make_doc.py Python script. + Please, don't change. In case you need to make corrections or changes change + source documentation in ./doc folder or script. + +Example of climate configuration for smartair2 protocol +======================================================= + +Configuration of your climate will depend on capabilities specific model. + +Minimal configuration will look like this: + +.. code-block:: yaml + + uart: + baud_rate: 9600 + tx_pin: 17 + rx_pin: 16 + + climate: + - platform: haier + name: Haier hOn Climate + + +Maximum configuration witch will use all possible options will look like this: + +.. code-block:: yaml + + uart: + baud_rate: 9600 + tx_pin: 17 + rx_pin: 16 + id: haier_uart + + api: + services: + - service: turn_on + then: + - climate.haier.power_on: haier_ac + - service: turn_off + then: + - climate.haier.power_off: haier_ac + + climate: + - platform: haier + id: haier_ac + protocol: smartAir2 + name: Haier SmartAir2 Climate + uart_id: haier_uart + alternative_swing_control: false + wifi_signal: true + visual: + min_temperature: 16 °C + max_temperature: 30 °C + temperature_step: 1 °C + supported_modes: + - 'OFF' + - HEAT_COOL + - COOL + - HEAT + - DRY + - FAN_ONLY + supported_swing_modes: + - 'OFF' + - VERTICAL + - HORIZONTAL + - BOTH + supported_presets: + - BOOST + - COMFORT + - AWAY + + switch: + - platform: template + id: haier_ac_health_mode + name: Haier SmartAir2 Climate health mode + icon: mdi:leaf + restore_mode: RESTORE_DEFAULT_OFF + lambda: |- + return id(haier_ac).get_health_mode(); + turn_on_action: + climate.haier.health_on: haier_ac + turn_off_action: + climate.haier.health_off: haier_ac + - platform: template + id: haier_ac_display_switch + name: Haier SmartAir2 Climate display + icon: mdi:led-on + entity_category: config + restore_mode: RESTORE_DEFAULT_ON + lambda: |- + return id(haier_ac).get_display_state(); + turn_on_action: + climate.haier.display_on: haier_ac + turn_off_action: + climate.haier.display_off: haier_ac + diff --git a/tests/.simple-hon.yaml b/tests/.simple-hon.yaml index 0d0573d..d9cacf8 100644 --- a/tests/.simple-hon.yaml +++ b/tests/.simple-hon.yaml @@ -1,4 +1,4 @@ climate: - platform: haier - protocol: hOn + protocol: hon name: ${device_name}