Many AC units ship with IR-only remotes and no smart control interface, making home automation integration difficult. This custom ESPHome component, modernized from @iverasp’s original work, implements the YK-H/531E IR protocol so an ESP32 or ESP8266 can control compatible air conditioners over infrared.
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:
| |
Configuration
Here’s a basic configuration example:
| |
- 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:
| |
Note if
use_fahrenheit: trueandha_office_temperature_sensoris 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.