I recently modernized an existing custom ESPHome component first develped by @iverasp for controlling AC units that use the YK-H/531E IR remote control protocol. This component allows you to integrate compatible air conditioners into your home automation system using infrared signals. I have been able to fully test it on ESP32 dev board as well as ESP8266-based Athom Tasmoda IR Controller using latest ESPHome v2025.7.0.
Features
In addition to what was already working I added a few features to my custom YKH531E component it includes the following capabilities:
- Temperature Range: 16-32°C (60-90°F)
- Operating Modes: Auto, Cool, Dry, Fan, Heat (heat is untested)
- Fan Speeds: Low, Medium, High, Auto
- Swing Control: Vertical swing support (Corrected)
- Temperature Units: Support for both Celsius and Fahrenheit (Fahrenheit added!)
Installation
Adding the component to your ESPHome configuration is straightforward:
1external_components:
2 - source: github://smazurov/esphome-ykh531e
3 components: [ykh531e]
Configuration
Here’s a basic configuration example:
1remote_transmitter:
2 pin: GPIO14
3 carrier_duty_percent: 50%
4
5climate:
6 - platform: ykh531e
7 name: "AC Unit"
8 supports_heat: false
9 supports_cool: true
10 use_fahrenheit: true
- IR Transmitter: Connect to any GPIO pin (GPIO14 in the example)
- IR Receiver (optional).
Note: You need enough RMT capacity on your esp32 or channels if using arduino framework.

The IR transmitter allows the ESP device to send commands to the AC unit, while the optional receiver can capture commands from the original remote to keep the ESPHome state synchronized.
Optional automatic thermostat
If you want your esphome to control when the unit turns on and off, modify the above config:
1- platform: ykh531e
2 name: "ir remote"
3 supports_cool: true
4 supports_heat: false
5 receiver_id: r
6 use_fahrenheit: true
7 id: ir_ac
8 internal: true # Hide from HA
9# Create a thermostat that controls the IR unit
10- platform: thermostat
11 name: "Frigidaire AC"
12 id: smart_thermostat
13 sensor: ha_office_temperature_sensor
14
15 min_cooling_off_time: 180s
16 min_cooling_run_time: 180s
17 min_idle_time: 60s
18
19 cool_action:
20 - climate.control:
21 id: ir_ac
22 mode: COOL
23 target_temperature: 24°C
24 swing_mode: VERTICAL
25
26 idle_action:
27 - climate.control:
28 id: ir_ac
29 mode: "OFF"
30
31 default_preset: Home
32 preset:
33 - name: Home
34 default_target_temperature_high: 24
35 mode: "COOL"
36 - name: Sleep
37 default_target_temperature_high: 30
38 mode: "OFF"
39 - name: Away_Cool
40 default_target_temperature_high: 22
41 mode: "COOL"
Note if
use_fahrenheit: true
andha_office_temperature_sensor
is reporting in fahrenheit, remember to convert the sensor value to celsius
Compatibility
Currently tested with the Frigidaire FHPC102AC1, but should work with other AC units using the YK-H/531E remote. Untested list includes:
FHPC082AB1, FHPC102AB1, FHPC132AB1, FHPH132AB1, FHPC082AB10, FHPC102AB10, FHPC132AB10, FHPH132AB10, FFPA0822U1, FFPA0822U10, FFPA0822U100, FFPA1022U1, FFPA1022U10, FFPA1022U100, FFPA1222U1, FFPA1222U10, FFPA1222U100, FFPA1422U1, FFPA1422U10, FFPA1422U100, FHPC082AC1
The source code is available on GitHub for those interested in contributing or adapting it for similar protocols. If you have any issues or have further enhancements, feel free to contribute or open an issue.