### climate.haier.start_self_cleaning Source: https://github.com/paveldn/haier-esphome/blob/master/docs/esphome-docs/climate/haier.rst Starts the self-cleaning function. ```APIDOC ## climate.haier.start_self_cleaning ### Description (supported only by hOn) Start self-cleaning. ### Method Not applicable (this is an action/service call). ### Endpoint Not applicable. ### Parameters #### Path Parameters None. #### Query Parameters None. #### Request Body - **device_id** (string) - Required - The ID of the Haier climate device. ``` -------------------------------- ### climate.haier.start_steri_cleaning Source: https://github.com/paveldn/haier-esphome/blob/master/docs/esphome-docs/climate/haier.rst Starts the 56°C steri-cleaning function. ```APIDOC ## climate.haier.start_steri_cleaning ### Description (supported only by hOn) Start 56°C steri-cleaning. ### Method Not applicable (this is an action/service call). ### Endpoint Not applicable. ### Parameters #### Path Parameters None. #### Query Parameters None. #### Request Body - **device_id** (string) - Required - The ID of the Haier climate device. ``` -------------------------------- ### Start Steri-Cleaning Source: https://github.com/paveldn/haier-esphome/blob/master/docs/esphome-docs/climate/haier.rst Initiates the 56°C steri-cleaning cycle for the AC (supported by hOn). Requires the device ID. ```yaml on_... then: - climate.haier.start_steri_cleaning: device_id ``` -------------------------------- ### Start Self-Cleaning Source: https://github.com/paveldn/haier-esphome/blob/master/docs/esphome-docs/climate/haier.rst Initiates the self-cleaning cycle for the AC (supported by hOn). Requires the device ID. ```yaml on_... then: - climate.haier.start_self_cleaning: device_id ``` -------------------------------- ### Start Steri-Cleaning on Haier AC Source: https://github.com/paveldn/haier-esphome/blob/master/README.rst Start the 56°C steri-cleaning function for the Haier AC (supported only by hOn). Requires the device ID. ```yaml on_...: then: - climate.haier.start_steri_cleaning: device_id ``` -------------------------------- ### Minimal Smartair2 Climate Configuration Source: https://github.com/paveldn/haier-esphome/blob/master/docs/examples/smartair2_example.rst Use this minimal configuration for basic setup. Ensure your model supports the smartair2 protocol. ```yaml climate: - platform: smartair2 name: "Smart Air Conditioner" unique_id: "smart_air_ac_1" devices: - mac_address: "AA:BB:CC:DD:EE:FF" protocol: smartair2 ``` -------------------------------- ### Example Configuration for Casarte CAS35MW1/R3-W Source: https://github.com/paveldn/haier-esphome/blob/master/docs/protocol_overview.rst Specific configuration parameters for the Casarte CAS35MW1/R3-W model, including status message header size, control packet size, and sensors packet size. ```yaml status_message_header_size: 38 control_packet_size: 10 sensors_packet_size: 24 ``` -------------------------------- ### Start Self-Cleaning on Haier AC Source: https://github.com/paveldn/haier-esphome/blob/master/README.rst Start the self-cleaning function for the Haier AC (supported only by hOn). Requires the device ID. ```yaml on_...: then: - climate.haier.start_self_cleaning: device_id ``` -------------------------------- ### ESPHome Configuration for Haier Module Source: https://github.com/paveldn/haier-esphome/blob/master/docs/haier_modules.rst This is an example ESPHome configuration for newer Haier modules using the ESP32-for-Haier board. It requires the esp-idf framework and specific FreeRTOS configuration. ```yaml esphome: name: haier esp32: board: esp32dev framework: type: esp-idf sdkconfig_options: CONFIG_FREERTOS_UNICORE: y wifi: ssid: !secret wifi_ssid password: !secret wifi_password ``` -------------------------------- ### ESPHome Configuration for ESP32-S3 Boards Source: https://github.com/paveldn/haier-esphome/blob/master/docs/usb_2_uart_boards.rst This configuration is a starting point for ESP32-S3 based boards with native USB and UART support. Ensure your Wi-Fi credentials are set in your secrets file. ```yaml esphome: name: haier platformio_options: board_build.flash_mode: dio esp32: board: esp32-s3-devkitc-1 framework: type: arduino wifi: ssid: !secret wifi_ssid password: !secret wifi_password uart: baud_rate: 9600 tx_pin: 19 rx_pin: 20 logger: level: WARN climate: - platform: haier name: Haier AC ``` -------------------------------- ### Haier Climate Binary Sensor Configuration Source: https://github.com/paveldn/haier-esphome/blob/master/docs/esphome-docs/binary_sensor/haier.rst Example configuration for adding various binary sensors to a Haier climate device. Ensure your device supports the hOn protocol. ```yaml binary_sensor: - platform: haier haier_id: haier_ac compressor_status: name: Haier Outdoor Compressor Status defrost_status: name: Haier Defrost Status four_way_valve_status: name: Haier Four Way Valve Status indoor_electric_heating_status: name: Haier Indoor Electric Heating Status indoor_fan_status: name: Haier Indoor Fan Status outdoor_fan_status: name: Haier Outdoor Fan Status ``` -------------------------------- ### Haier Climate Sensor Configuration Source: https://github.com/paveldn/haier-esphome/blob/master/docs/esphome-docs/sensor/haier.rst Example configuration for adding various sensors to a Haier climate device. Ensure your climate model supports the desired sensors. ```yaml sensor: - platform: haier haier_id: haier_ac outdoor_temperature: name: Haier outdoor temperature humidity: name: Haier Indoor Humidity compressor_current: name: Haier Compressor Current compressor_frequency: name: Haier Compressor Frequency expansion_valve_open_degree: name: Haier Expansion Valve Open Degree indoor_coil_temperature: name: Haier Indoor Coil Temperature outdoor_coil_temperature: name: Haier Outdoor Coil Temperature outdoor_defrost_temperature: name: Haier Outdoor Defrost Temperature outdoor_in_air_temperature: name: Haier Outdoor In Air Temperature outdoor_out_air_temperature: name: Haier Outdoor Out Air Temperature power: name: Haier Power ``` -------------------------------- ### Haier Text Sensor Configuration Source: https://github.com/paveldn/haier-esphome/blob/master/docs/esphome-docs/text_sensor/haier.rst Example configuration for adding text sensors to a Haier climate device. Ensure the device uses the hOn protocol. ```yaml text_sensor: - platform: haier haier_id: haier_ac appliance_name: name: Haier appliance name cleaning_status: name: Haier cleaning status protocol_version: name: Haier protocol version ``` -------------------------------- ### ESPHome Configuration for ESP32-S3 USB Boards Source: https://github.com/paveldn/haier-esphome/blob/master/docs/examples/usb_2_uart_boards.rst Sample ESPHome configuration that works for ESP32-S3 based boards with native USB support. This configuration serves as a starting point for integrating Haier AC units. ```yaml esphome: name: "haier_ac_usb_s3" platform: ESP32 board: "esp32s3" wifi: ssid: "YOUR_WIFI_SSID" password: "YOUR_WIFI_PASSWORD" # Enable logging logger: # Enable Home Assistant API api: password: "YOUR_API_PASSWORD" ota: # Enable UART uart: rx_pin: GPIO17 tx_pin: GPIO18 baud_rate: 115200 # Enable the Haier AC integration haier_ac: uart_id: uart_bus # Add other Haier AC specific configurations here ``` -------------------------------- ### Haier Climate Binary Sensors Configuration Source: https://github.com/paveldn/haier-esphome/blob/master/README.rst Example configuration for Haier climate binary sensors. These sensors indicate various statuses like compressor activity, defrost, four-way valve, and heating system activity. ```yaml binary_sensor: - platform: haier haier_id: haier_ac compressor_status: name: Haier compressor status defrost_status: name: Haier defrost status four_way_valve_status: name: Haier four way valve status indoor_electric_heating_status: name: Haier indoor electric heating status indoor_fan_status: name: Haier indoor fan status outdoor_fan_status: name: Haier outdoor fan status ``` -------------------------------- ### Haier Climate Button Configuration Source: https://github.com/paveldn/haier-esphome/blob/master/docs/esphome-docs/button/haier.rst Example configuration for adding self-cleaning and steri-cleaning buttons to a Haier climate device. Ensure your device supports the hOn protocol. ```yaml button: - platform: haier haier_id: haier_ac self_cleaning: name: Haier start self cleaning steri_cleaning: name: Haier start 56°C steri-cleaning ``` -------------------------------- ### Haier Climate Configuration Source: https://github.com/paveldn/haier-esphome/blob/master/docs/esphome-docs/climate/haier.rst Example configuration for a Haier climate device using the hOn protocol. Includes settings for name, UART port, display, temperature range, supported modes, swing modes, and event handlers for alarms and status messages. ```yaml climate: - platform: haier id: haier_ac protocol: hon name: Haier AC uart_id: ac_port wifi_signal: true display: 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: - AWAY - BOOST - SLEEP on_alarm_start: then: - logger.log: level: WARN format: "Alarm activated. Code: %d. Message: \"%s\"" args: [ code, message] on_alarm_end: then: - logger.log: level: INFO format: "Alarm deactivated. Code: %d. Message: \"%s\"" args: [ code, message] on_status_message: then: - logger.log: level: INFO format: "New status message received, size=%d, subcmd=%02X%02X" args: [ 'data_size', 'data[0]', 'data[1]' ] ``` -------------------------------- ### Haier Climate Switch Configuration Source: https://github.com/paveldn/haier-esphome/blob/master/docs/esphome-docs/switch/haier.rst Example configuration entry for setting up additional switches for Haier climate devices. This includes options for the beeper, health mode, display, and quiet mode. ```yaml switch: - platform: haier beeper: name: Haier beeper health_mode: name: Haier health mode display: name: Haier display quiet_mode: name: Haier quiet mode ``` -------------------------------- ### climate.haier.power_on Source: https://github.com/paveldn/haier-esphome/blob/master/docs/esphome-docs/climate/haier.rst Turns the AC power on. ```APIDOC ## climate.haier.power_on ### Description This action turns the AC power on. ### Method Not applicable (this is an action/service call). ### Endpoint Not applicable. ### Parameters #### Path Parameters None. #### Query Parameters None. #### Request Body - **device_id** (string) - Required - The ID of the Haier climate device. ``` -------------------------------- ### Turn AC Power On Source: https://github.com/paveldn/haier-esphome/blob/master/docs/esphome-docs/climate/haier.rst Use this action to turn on the AC power. Requires the device ID. ```yaml on_... then: climate.haier.power_on: device_id ``` -------------------------------- ### Backup ESP32 Haier Module Firmware Source: https://github.com/paveldn/haier-esphome/blob/master/docs/esp32_backup.rst Use this command with esptool to create a full backup of the original firmware from the ESP32 Haier module. Ensure the device is in flash mode and connected via UART0. ```bash python esptool.py -b 115200 –port read_flash 0x00000 0x400000 flash_4M.bin ``` -------------------------------- ### climate.haier.display_on Source: https://github.com/paveldn/haier-esphome/blob/master/docs/esphome-docs/climate/haier.rst Turns the AC display on. ```APIDOC ## climate.haier.display_on ### Description This action turns the AC display on. ### Method Not applicable (this is an action/service call). ### Endpoint Not applicable. ### Parameters #### Path Parameters None. #### Query Parameters None. #### Request Body - **device_id** (string) - Required - The ID of the Haier climate device. ``` -------------------------------- ### Turn AC Display On Source: https://github.com/paveldn/haier-esphome/blob/master/docs/esphome-docs/climate/haier.rst Use this action to turn on the AC display. Requires the device ID. ```yaml on_... then: climate.haier.display_on: device_id ``` -------------------------------- ### ESPHome Configuration for ESP32-C3U USB Board Source: https://github.com/paveldn/haier-esphome/blob/master/docs/examples/usb_2_uart_boards.rst Sample ESPHome configuration for the M5Stamp C3U (white color) board, which has native USB support and can communicate using UART. Note that the black M5Stamp C3 board without 'U' does not support UART communication via its dedicated USB chip. ```yaml esphome: name: "haier_ac_usb_c3u" platform: ESP32C3 board: "esp32c3" wifi: ssid: "YOUR_WIFI_SSID" password: "YOUR_WIFI_PASSWORD" # Enable logging logger: # Enable Home Assistant API api: password: "YOUR_API_PASSWORD" ota: # Enable UART uart: rx_pin: GPIO21 tx_pin: GPIO22 baud_rate: 115200 # Enable the Haier AC integration haier_ac: uart_id: uart_bus # Add other Haier AC specific configurations here ``` -------------------------------- ### Turn On Health Mode Source: https://github.com/paveldn/haier-esphome/blob/master/docs/esphome-docs/climate/haier.rst Use this action to turn on health mode (UV light sterilization). Requires the device ID. ```yaml on_... then: climate.haier.health_on: device_id ``` -------------------------------- ### ESPHome Configuration for ESP32-C3U Board Source: https://github.com/paveldn/haier-esphome/blob/master/docs/usb_2_uart_boards.rst This configuration is for the M5Stamp C3U (white color) board, which has native USB and UART support. Note that the black M5Stamp C3 board is not compatible. ```yaml esphome: name: haier platformio_options: board_build.flash_mode: dio esp32: board: esp32-c3-devkitm-1 framework: type: arduino wifi: ssid: !secret wifi_ssid password: !secret wifi_password uart: baud_rate: 9600 tx_pin: 18 rx_pin: 19 logger: level: WARN climate: - platform: haier name: Haier AC ``` -------------------------------- ### climate.haier.power_toggle Source: https://github.com/paveldn/haier-esphome/blob/master/docs/esphome-docs/climate/haier.rst Toggles the AC power state. ```APIDOC ## climate.haier.power_toggle ### Description This action toggles the AC power state. ### Method Not applicable (this is an action/service call). ### Endpoint Not applicable. ### Parameters #### Path Parameters None. #### Query Parameters None. #### Request Body - **device_id** (string) - Required - The ID of the Haier climate device. ``` -------------------------------- ### Haier AC on_alarm_start Automation Source: https://github.com/paveldn/haier-esphome/blob/master/docs/esphome-docs/climate/haier.rst Configure an automation to log a warning when the Haier AC activates a new alarm. The alarm code and message are available for logging. ```yaml climate: - protocol: hon on_alarm_start: then: - logger.log: level: WARN format: "Alarm activated. Code: %d. Message: \"%s\"" args: [ 'code', 'message' ] ``` -------------------------------- ### Configure Haier Climate Binary Sensors Source: https://github.com/paveldn/haier-esphome/blob/master/docs/hon_example.rst Set up binary sensors for the Haier climate device to monitor status conditions like compressor and defrost. The haier_id must correspond to your climate configuration. ```yaml binary_sensor: - platform: haier haier_id: haier_ac compressor_status: name: Haier hOn Climate Compressor Status defrost_status: ``` -------------------------------- ### climate.haier.health_on Source: https://github.com/paveldn/haier-esphome/blob/master/docs/esphome-docs/climate/haier.rst Turns on health mode (UV light sterilization). ```APIDOC ## climate.haier.health_on ### Description Turn on health mode (UV light sterilization). ### Method Not applicable (this is an action/service call). ### Endpoint Not applicable. ### Parameters #### Path Parameters None. #### Query Parameters None. #### Request Body - **device_id** (string) - Required - The ID of the Haier climate device. ``` -------------------------------- ### Toggle AC Power Source: https://github.com/paveldn/haier-esphome/blob/master/docs/esphome-docs/climate/haier.rst Use this action to toggle the AC power state. Requires the device ID. ```yaml on_... then: climate.haier.power_toggle: device_id ``` -------------------------------- ### Toggle Power on Haier AC Source: https://github.com/paveldn/haier-esphome/blob/master/README.rst Use this action to toggle the AC power state. Requires the device ID. ```yaml on_...: then: climate.haier.power_toggle: device_id ``` -------------------------------- ### Minimal hOn Climate Configuration Source: https://github.com/paveldn/haier-esphome/blob/master/docs/examples/hon_example.rst This is the most basic configuration for a Haier climate device using the hOn protocol. It includes only the essential parameters. ```yaml climate: - platform: hon name: "Haier AC" unique_id: "haier_ac_12345" device_id: "ABCDEF1234567890" ``` -------------------------------- ### climate.haier.beeper_on Source: https://github.com/paveldn/haier-esphome/blob/master/docs/esphome-docs/climate/haier.rst Enables beep feedback on every command sent to AC (supported only by hOn). ```APIDOC ## climate.haier.beeper_on ### Description (supported only by hOn) This action enables beep feedback on every command sent to AC. ### Method Not applicable (this is an action/service call). ### Endpoint Not applicable. ### Parameters #### Path Parameters None. #### Query Parameters None. #### Request Body - **device_id** (string) - Required - The ID of the Haier climate device. ``` -------------------------------- ### Enable Beeper Feedback Source: https://github.com/paveldn/haier-esphome/blob/master/docs/esphome-docs/climate/haier.rst Enables beep feedback on every command sent to the AC (supported by hOn). Requires the device ID. ```yaml on_... then: climate.haier.beeper_on: device_id ``` -------------------------------- ### ESP32 Dual UART Sniffer Configuration Source: https://github.com/paveldn/haier-esphome/blob/master/docs/sniffing_serial_communication.rst This ESPHome configuration sets up an ESP32 board to act as a dual UART sniffer for Haier appliance communication. It configures two UART ports to capture RX and TX data separately at 9600 baud rate, with debugging enabled to log captured data. ```yaml substitutions: device_name: "Dual UART Sniffer for Haier Project" device_id: uart_sniffer esphome: name: ${device_id} comment: ${device_name} esp32: board: esp32dev wifi: ssid: !secret wifi_ssid password: !secret wifi_password api: reboot_timeout: 0s ota: web_server: logger: tx_buffer_size: 4096 baud_rate: 0 level: DEBUG uart: - id: esp_board rx_pin: GPIO3 baud_rate: 9600 debug: direction: RX dummy_receiver: true sequence: - lambda: UARTDebug::log_hex(uart::UART_DIRECTION_RX, bytes, ' '); - id: haier_appliance rx_pin: GPIO16 baud_rate: 9600 debug: direction: RX dummy_receiver: true sequence: - lambda: UARTDebug::log_hex(uart::UART_DIRECTION_TX, bytes, ' '); ``` -------------------------------- ### Configure Haier Climate Vertical Airflow Source: https://github.com/paveldn/haier-esphome/blob/master/docs/hon_example.rst Set up the vertical airflow options for the Haier climate device. Use the lambda to map string inputs to the appropriate VerticalSwingMode enum values. ```yaml 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; ``` -------------------------------- ### Minimal Haier Climate Configuration Source: https://github.com/paveldn/haier-esphome/blob/master/docs/smartair2_example.rst This is the most basic configuration for a Haier climate device. It requires UART settings and a name for the climate entity. ```yaml uart: baud_rate: 9600 tx_pin: 17 rx_pin: 16 climate: - platform: haier name: Haier hOn Climate ``` -------------------------------- ### Maximum Haier hOn Climate Configuration Source: https://github.com/paveldn/haier-esphome/blob/master/docs/hon_example.rst This comprehensive configuration demonstrates all available options for a Haier climate device using the hOn protocol. It includes advanced settings for API, climate, buttons, sensors, switches, and select components, enabling full control and monitoring. ```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 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: - 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: haier beeper: name: Haier hOn Climate beeper health_mode: name: Haier hOn Climate health mode display: name: Haier hOn Climate display quiet_mode: name: Haier hOn Climate quiet mode 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"); ``` -------------------------------- ### climate.haier.power_off Source: https://github.com/paveldn/haier-esphome/blob/master/docs/esphome-docs/climate/haier.rst Turns the AC power off. ```APIDOC ## climate.haier.power_off ### Description This action turns the AC power off. ### Method Not applicable (this is an action/service call). ### Endpoint Not applicable. ### Parameters #### Path Parameters None. #### Query Parameters None. #### Request Body - **device_id** (string) - Required - The ID of the Haier climate device. ``` -------------------------------- ### Enable Beeper Feedback on Haier AC Source: https://github.com/paveldn/haier-esphome/blob/master/README.rst Enable beep feedback on every command sent to the AC (supported only by hOn). Requires the device ID. ```yaml on_...: then: climate.haier.beeper_on: device_id ``` -------------------------------- ### Turn AC Power Off Source: https://github.com/paveldn/haier-esphome/blob/master/docs/esphome-docs/climate/haier.rst Use this action to turn off the AC power. Requires the device ID. ```yaml on_... then: climate.haier.power_off: device_id ``` -------------------------------- ### Maximum hOn Climate Configuration Source: https://github.com/paveldn/haier-esphome/blob/master/docs/examples/hon_example.rst This configuration utilizes all available options for a Haier climate device with the hOn protocol. It demonstrates advanced settings and capabilities. ```yaml climate: - platform: hon name: "Haier AC Advanced" unique_id: "haier_ac_advanced_67890" device_id: "FEDCBA0987654321" target_temperature_step: 0.5 fan_modes: - 'auto' - 'low' - 'medium' - 'high' swing_modes: - 'off' - 'both' - 'vertical' - 'horizontal' visualize_commute: true disable_auto_off: true disable_auto_on: true disable_auto_state: true disable_auto_fan: true disable_auto_swing: true disable_auto_mode: true disable_auto_target_temperature: true disable_auto_target_temperature_high: true disable_auto_target_temperature_low: true disable_auto_target_temperature_step: true disable_auto_fan_mode: true disable_auto_swing_mode: true disable_auto_visualize_commute: true disable_auto_disable_auto_off: true disable_auto_disable_auto_on: true disable_auto_disable_auto_state: true disable_auto_disable_auto_fan: true disable_auto_disable_auto_swing: true disable_auto_disable_auto_mode: true disable_auto_disable_auto_target_temperature: true disable_auto_disable_auto_target_temperature_high: true disable_auto_disable_auto_target_temperature_low: true disable_auto_disable_auto_target_temperature_step: true disable_auto_disable_auto_fan_mode: true disable_auto_disable_auto_swing_mode: true disable_auto_disable_auto_visualize_commute: true ``` -------------------------------- ### Turn On Health Mode on Haier AC Source: https://github.com/paveldn/haier-esphome/blob/master/README.rst Turn on health mode (UV light sterilization) for the Haier AC. Requires the device ID. ```yaml on_...: then: climate.haier.health_on: device_id ``` -------------------------------- ### Maximum Smartair2 Climate Configuration Source: https://github.com/paveldn/haier-esphome/blob/master/docs/examples/smartair2_example.rst This configuration utilizes all available options for advanced control. Adapt parameters based on your specific model's capabilities. ```yaml climate: - platform: smartair2 name: "Advanced Smart AC" unique_id: "advanced_ac_1" devices: - mac_address: "11:22:33:44:55:66" protocol: smartair2 # Optional parameters for advanced configuration # For example, specific fan modes, swing settings, etc. # Refer to your device's documentation for supported options. # fan_mode: "auto" # swing_mode: "vertical" # target_temperature_step: 0.5 # supported_features: 15 # Example: supports all features # Additional options can be configured here if needed # e.g., sensors, custom commands, etc. ``` -------------------------------- ### Request for Normal Data Log Entry Source: https://github.com/paveldn/haier-esphome/blob/master/docs/protocol_overview.rst This log entry shows a request being sent to the air conditioner for normal data. It indicates the packet type and the specific subcommand used. ```log 20:07:46 [D] [haier.protocol:019] Sending frame: type 01, data: 4D 01 ``` -------------------------------- ### Request for Extended Data Log Entry Source: https://github.com/paveldn/haier-esphome/blob/master/docs/protocol_overview.rst This log entry illustrates a request being sent to the air conditioner for extended data. It specifies the packet type and the subcommand for extended data retrieval. ```log 20:07:57 [D] [haier.protocol:019] Sending frame: type 01, data: 4D FE ``` -------------------------------- ### Power Off Haier AC Source: https://github.com/paveldn/haier-esphome/blob/master/README.rst Use this action to turn the AC power off. Requires the device ID. ```yaml on_...: then: climate.haier.power_off: device_id ``` -------------------------------- ### Response to Normal Data Request Log Entry Source: https://github.com/paveldn/haier-esphome/blob/master/docs/protocol_overview.rst This log entry captures the response received from the air conditioner after a normal data request. It shows the packet type and the data payload, which includes status information. ```log 20:07:46 [D] [haier.protocol:019] Frame found: type 02, data: 6D 01 07 06 C2 00 02 00 00 07 00 00 3E 00 50 00 00 03 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ``` -------------------------------- ### Configure Haier Climate Sensors Source: https://github.com/paveldn/haier-esphome/blob/master/docs/hon_example.rst Define various sensor readings for the Haier climate device, including compressor status, temperature, humidity, and power consumption. Ensure the haier_id matches your climate device configuration. ```yaml 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 ``` -------------------------------- ### Configure Haier Climate Horizontal Airflow Source: https://github.com/paveldn/haier-esphome/blob/master/docs/hon_example.rst Configure the horizontal airflow settings for the Haier climate device. The lambda function translates user-friendly string options into the corresponding HorizontalSwingMode enum. ```yaml 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; ``` -------------------------------- ### Maximum Haier Climate Configuration with Advanced Options Source: https://github.com/paveldn/haier-esphome/blob/master/docs/smartair2_example.rst This configuration utilizes all available options for a Haier SmartAir2 climate device, including advanced API services, detailed visual settings, supported modes, and additional switch entities for health and display. ```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: haier health_mode: name: Haier SmartAir2 Climate health mode display: name: Haier SmartAir2 Climate display ``` -------------------------------- ### Response to Extended Data Request Log Entry Source: https://github.com/paveldn/haier-esphome/blob/master/docs/protocol_overview.rst This log entry shows the response received from the air conditioner after an extended data request. It includes the packet type and a larger data payload containing extended sensor information. ```log 20:07:57 [D] [haier.protocol:019] Frame found: type 02, data: 7D 01 07 06 C2 00 02 00 00 07 00 00 3E 00 50 00 00 03 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 66 4A 4D 4D 4C 00 01 FF 02 20 00 32 ``` -------------------------------- ### Haier AC on_status_message Automation Source: https://github.com/paveldn/haier-esphome/blob/master/docs/esphome-docs/climate/haier.rst This trigger can be used to support features that are unique for the model and not supported by others. Raw message binary (without header and checksum) will be provided in the variable data (const char *), message length in the variable data_size (uint8_t). ```yaml climate: - protocol: hon on_status_message: then: - logger.log: format: "Status message received. Data: %s" args: [ 'data' ] ``` -------------------------------- ### climate.haier.set_horizontal_airflow Source: https://github.com/paveldn/haier-esphome/blob/master/docs/esphome-docs/climate/haier.rst Sets the direction for horizontal airflow. ```APIDOC ## climate.haier.set_horizontal_airflow ### Description (supported only by hOn) Set direction for horizontal airflow if the horizontal swing is disabled. Possible values: Max_Left, Left, Center, Right, Max_Right. ### Method Not applicable (this is an action/service call). ### Endpoint Not applicable. ### Parameters #### Path Parameters None. #### Query Parameters None. #### Request Body - **device_id** (string) - Required - The ID of the Haier climate device. - **horizontal_airflow** (string) - Required - The desired horizontal airflow direction (e.g., Left, Right, Center). ``` -------------------------------- ### climate.haier.display_off Source: https://github.com/paveldn/haier-esphome/blob/master/docs/esphome-docs/climate/haier.rst Turns the AC display off. ```APIDOC ## climate.haier.display_off ### Description This action turns the AC display off. ### Method Not applicable (this is an action/service call). ### Endpoint Not applicable. ### Parameters #### Path Parameters None. #### Query Parameters None. #### Request Body - **device_id** (string) - Required - The ID of the Haier climate device. ``` -------------------------------- ### Set Horizontal Airflow Direction Source: https://github.com/paveldn/haier-esphome/blob/master/docs/esphome-docs/climate/haier.rst Sets the direction for horizontal airflow when horizontal swing is disabled (supported by hOn). Possible values include Max_Left, Left, Center, Right, Max_Right. Requires device ID and airflow setting. ```yaml on_... then: - climate.haier.set_horizontal_airflow: id: device_id vertical_airflow: Right ``` -------------------------------- ### climate.haier.set_vertical_airflow Source: https://github.com/paveldn/haier-esphome/blob/master/docs/esphome-docs/climate/haier.rst Sets the direction for vertical airflow. ```APIDOC ## climate.haier.set_vertical_airflow ### Description (supported only by hOn) Set direction for vertical airflow if the vertical swing is disabled. Possible values: Health_Up, Max_Up, Up, Center, Down, Health_Down. ### Method Not applicable (this is an action/service call). ### Endpoint Not applicable. ### Parameters #### Path Parameters None. #### Query Parameters None. #### Request Body - **device_id** (string) - Required - The ID of the Haier climate device. - **vertical_airflow** (string) - Required - The desired vertical airflow direction (e.g., Up, Down, Center). ``` -------------------------------- ### Turn Off Health Mode Source: https://github.com/paveldn/haier-esphome/blob/master/docs/esphome-docs/climate/haier.rst Use this action to turn off health mode. Requires the device ID. ```yaml on_... then: climate.haier.health_off: device_id ``` -------------------------------- ### Turn AC Display Off Source: https://github.com/paveldn/haier-esphome/blob/master/docs/esphome-docs/climate/haier.rst Use this action to turn off the AC display. Requires the device ID. ```yaml on_... then: climate.haier.display_off: device_id ``` -------------------------------- ### Set Horizontal Airflow Direction on Haier AC Source: https://github.com/paveldn/haier-esphome/blob/master/README.rst Set the direction for horizontal airflow when horizontal swing is disabled (supported only by hOn). Possible values include Max_Left, Left, Center, Right, Max_Right. Requires device ID and airflow setting. ```yaml on_...: then: - climate.haier.set_horizontal_airflow: id: device_id vertical_airflow: Right ``` -------------------------------- ### climate.haier.health_off Source: https://github.com/paveldn/haier-esphome/blob/master/docs/esphome-docs/climate/haier.rst Turns off health mode. ```APIDOC ## climate.haier.health_off ### Description Turn off health mode. ### Method Not applicable (this is an action/service call). ### Endpoint Not applicable. ### Parameters #### Path Parameters None. #### Query Parameters None. #### Request Body - **device_id** (string) - Required - The ID of the Haier climate device. ``` -------------------------------- ### Set Vertical Airflow Direction Source: https://github.com/paveldn/haier-esphome/blob/master/docs/esphome-docs/climate/haier.rst Sets the direction for vertical airflow when vertical swing is disabled (supported by hOn). Possible values include Health_Up, Max_Up, Up, Center, Down, Health_Down. Requires device ID and airflow setting. ```yaml on_... then: - climate.haier.set_vertical_airflow: id: device_id vertical_airflow: Up ``` -------------------------------- ### Handle Haier AC Status Messages Source: https://github.com/paveldn/haier-esphome/blob/master/README.rst Trigger automations when a new status packet is received from the AC. The raw message data and its size are available for use in lambdas. ```yaml climate: - protocol: hon on_status_message: then: - logger.log: level: INFO format: "New status message received, size=%d, subcmd=%02X%02X" args: [ 'data_size', 'data[0]', 'data[1]' ] ``` -------------------------------- ### Set Vertical Airflow Direction on Haier AC Source: https://github.com/paveldn/haier-esphome/blob/master/README.rst Set the direction for vertical airflow when vertical swing is disabled (supported only by hOn). Possible values include Health_Up, Max_Up, Up, Center, Down, Health_Down. Requires device ID and airflow setting. ```yaml on_...: then: - climate.haier.set_vertical_airflow: id: device_id vertical_airflow: Up ``` -------------------------------- ### climate.haier.beeper_off Source: https://github.com/paveldn/haier-esphome/blob/master/docs/esphome-docs/climate/haier.rst Disables beep feedback on every command sent to AC (supported only by hOn). ```APIDOC ## climate.haier.beeper_off ### Description (supported only by hOn) This action disables beep feedback on every command sent to AC (keep in mind that this will not work for IR remote commands). ### Method Not applicable (this is an action/service call). ### Endpoint Not applicable. ### Parameters #### Path Parameters None. #### Query Parameters None. #### Request Body - **device_id** (string) - Required - The ID of the Haier climate device. ``` -------------------------------- ### Haier AC on_alarm_end Automation Source: https://github.com/paveldn/haier-esphome/blob/master/docs/esphome-docs/climate/haier.rst Configure an automation to log information when a Haier AC alarm is deactivated. The alarm code and message are available for logging. ```yaml climate: - protocol: hon on_alarm_end: then: - logger.log: level: INFO format: "Alarm deactivated. Code: %d. Message: \"%s\"" args: [ 'code', 'message' ] ``` -------------------------------- ### climate.haier.set_horizontal_airflow Source: https://github.com/paveldn/haier-esphome/blob/master/README.rst Set direction for horizontal airflow if the horizontal swing is disabled. Possible values: Max_Left, Left, Center, Right, Max_Right. ```APIDOC ## climate.haier.set_horizontal_airflow Action ### Description (supported only by hOn) Set direction for horizontal airflow if the horizontal swing is disabled. Possible values: `Max_Left`, `Left`, `Center`, `Right`, `Max_Right`. ### Method Not applicable (ESPHome action) ### Endpoint Not applicable (ESPHome action) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **device_id** (string) - Required - The ID of the climate device. - **vertical_airflow** (string) - Required - The desired horizontal airflow direction. Possible values: Max_Left, Left, Center, Right, Max_Right. ### Request Example ```yaml on_... then: - climate.haier.set_horizontal_airflow: id: device_id vertical_airflow: Right ``` ### Response #### Success Response (200) None specified #### Response Example None specified ``` -------------------------------- ### Turn Off Health Mode on Haier AC Source: https://github.com/paveldn/haier-esphome/blob/master/README.rst Turn off health mode for the Haier AC. Requires the device ID. ```yaml on_...: then: climate.haier.health_off: device_id ``` -------------------------------- ### climate.haier.set_vertical_airflow Source: https://github.com/paveldn/haier-esphome/blob/master/README.rst Set direction for vertical airflow if the vertical swing is disabled. Possible values: Health_Up, Max_Up, Up, Center, Down, Health_Down. ```APIDOC ## climate.haier.set_vertical_airflow Action ### Description (supported only by hOn) Set direction for vertical airflow if the vertical swing is disabled. Possible values: Health_Up, Max_Up, Up, Center, Down, Health_Down. ### Method Not applicable (ESPHome action) ### Endpoint Not applicable (ESPHome action) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **device_id** (string) - Required - The ID of the climate device. - **vertical_airflow** (string) - Required - The desired vertical airflow direction. Possible values: Health_Up, Max_Up, Up, Center, Down, Health_Down. ### Request Example ```yaml on_... then: - climate.haier.set_vertical_airflow: id: device_id vertical_airflow: Up ``` ### Response #### Success Response (200) None specified #### Response Example None specified ```