This integration allows you to control Air Conditioners and generic infrared devices managed via a Tuya Smart IR Hub using the Tuya IoT Cloud Platform. It provides real-time status updates and local-like responsiveness via the Tuya Pulsar messaging service.
With this integration, you can easily control and manage:
- Infrared Air Conditioners
- Generic Infrared Devices
- Temperature & Humidity Sensors
💡 Note: This repository is an evolved, fully optimized continuation of the original DavidIlie's project. It features a complete architectural rewrite, shifting entirely away from legacy
configuration.yamlsetup to modern UI Configuration (Config Flow), and introduces real-time updates via Tuya Pulsar WebSocket stream to avoid unnecessary API throttling.
The easiest way to install this integration and receive automatic updates is through the Home Assistant Community Store (HACS).
- Open HACS in your Home Assistant instance.
- Navigate to Integrations and click the three dots in the top right corner.
- Select Custom repositories and add this repository URL with the category set to
Integration. - Search for
Tuya Smart IR ACand click Download. - Restart Home Assistant to apply the changes.
- Download the latest release from the GitHub repository.
- Extract the
custom_components/tuya_smart_ir_acdirectory. - Copy this directory into your Home Assistant installation's
custom_components/folder. - Restart Home Assistant.
Before configuring the integration in Home Assistant, you must set up a cloud project on the Tuya IoT Platform to retrieve your API credentials.
- Log into the Tuya IoT Development Platform.
- From the left-hand sidebar, navigate to Cloud ➔ Project Management.
- Click Create Cloud Project (or select an existing one).
- Fill in the project details:
- Project Name / Description: Enter any friendly name.
- Industry: Select
Smart Home. - Development Method: Select
Smart Home. - Data Center: You must select the data center matching the country set in your Smart Life app account. Refer to the Tuya Data Center Mapping Guide to find your correct region.
- Click Create.
- On the next screen (Authorize API Services wizard), ensure that IoT Core and IR Control Hub Open Services are checked.
- Click Authorize.
To see your physical devices in the cloud project, you need to link your mobile application account.
- On your project page, navigate to the Devices tab.
- Click Link App Account (do not use "Link My App").
- Click Add App Account. A QR code will be displayed.
- Open the Smart Life app on your phone, tap the [+] or scan icon in the top right, and scan the QR code.
- Confirm the authorization on your phone.
- Your account is now linked. You will see a list of your devices under the project. Take note of your Device IDs here, as you will need them during the Home Assistant setup.
- Navigate back to the project Overview tab.
- Copy and save your Access ID, Access Secret, and your Data Center region (e.g., Europe, Western America).
By default, the Tuya Cloud does not forward real-time event messages to the integration unless explicitly instructed. If you skip this step, your entity states in Home Assistant will not update immediately when changes happen outside of HA.
- In the Tuya IoT Platform, go to Cloud ➔ Development ➔ Select your project ➔ Message Service tab.
- Ensure the main Message Service toggle switch at the top is turned ON (Enabled).
- Click on the Production Environment tab.
⚠️ Important: Home Assistant ignores the Test Environment entirely. All configurations must be done under Production. - Under the Messaging Rules / Subscriptions section, explicitly enable the following message types (BizCode):
devicePropertyMessage(Device Property Message) — Crucial for climate state and telemetry updates.statusReport(Status Report) — Crucial for real-time reporting.deviceEventMessage(Device Event Message)deviceActionResponseMessage(Device Action Response Message)
💡 Troubleshooting Tip: If these are already checked but your entities aren't updating in real-time, uncheck them, save, and re-check them to force Tuya to rebuild its backend routing rules.
Configuration is done exclusively via the Home Assistant User Interface. No changes to configuration.yaml are required.
Setup follows a two-part flow: First, you add the Tuya Smart IR Hub, and then you add individual AC / Generic Devices to that hub.
- In Home Assistant, navigate to Settings ➔ Devices & Services.
- Click Add Integration in the bottom right corner.
- Search for Tuya Smart IR AC and select it.
- Enter your credentials collected in Step 1.3:
- Access ID
- Access Secret
- Country Region
- Leave intervals at their default values unless you have a specific optimization use-case. (The Tuya Pulsar stream toggle is optional and disabled by default).
- Click Submit.
Once the main hub is added, you can populate it with your configured IR sub-devices:
- Locate the Tuya Smart IR Hub in your Devices & Services dashboard.
- Click the Configure (or gear icon) button on the integration card.
- Select Device Management ➔ Air Conditioner Management ➔ Add a new Air Conditioner.
- Configure the entity properties:
- Infrared Hub ID: Paste the Device ID of the physical Tuya IR Hub itself (found in step 1.2).
- Air Conditioner ID: Paste the Device ID of the virtual remote control added underneath the hub inside the Smart Life app.
- Air Conditioner Name: Enter a friendly name for your new climate entity.
- Adjust any optional performance tuning settings as needed and click Submit.
Your new climate entity is now ready for use!
If you ever need to adjust names, IDs, or settings, simply re-run the configuration wizard by clicking Configure on the integration page and choosing the appropriate management sub-menu.
If you encounter issues or want to inspect the real-time WebSocket connection traffic, you can enable detailed debug logging by adding the following block to your configuration.yaml:
logger:
default: info
logs:
custom_components.tuya_smart_ir_ac: debugHome Assistant needs to be restarted after this change.
If you have ideas to contribute to the project, open a pull request and we will evaluate together how to implement the improvement. Thanks!
I dedicate my free time to the development and support for this integration, if you appreciate my work and want to support me, you can buy me a coffee. Thanks!
