Tuya Zigbee IR Blaster in Home Assistant

, last updated:
 A person sitting in a white room, holding a remote control in their hand.

After years of playing around with Philips Hue and never being really happy about it, I switched to Home Assistant. I installed it on a Raspberry Pie, added a ZigBee USB-Stick and never looked back.

It’s simply amazing. Fully customisable, everything local. And zero problems.

There was only one thing I wished it had. Infrared output. I wanted to remote control devices that only had IR-Input. I tried two Broadlink devices, and both sucked. The first just didn’t want to connect to a properly secured wifi, the other one was buggy as hell. I needed something better. And I found it.

The Tuya Zigbee IR Blaster ZS06

Setting it up is sadly a bit harder than the usual “a couple of clicks” in Home Assistant.

Let’s start.


Things you need:


To enable the support for the Tuya IR, you need to install a small script:

  1. Create a folder called custom_zha_quirks in your config directory
  2. Copy the ts1201.py into that directory
  3. Add these lines to the config.yaml to enable the file:
      custom_quirks_path: custom_zha_quirks
  4. Restart Home Assistant

Now you should have everything configured to try it out.

Add the device to your system

Initiate the pairing process by pressing the button on the device for around 5 seconds till the LED starts blinking. You will be able to add the device in Home Assistant now.

Navigate to the ZHA configuration page and click on the “Add Devices” button. The device should show up as “Tuya Zigbee IR Blaster ZS06”. Click on it and wait for the pairing process to finish.

Open your Home Assistant instance and show your ZHA configuration

After the device was added, navigate to it and click on the “…” button in the device info box. Click on “Manage zigbee device” to open the device configuration page. There you can send commands to the device.

Select the “ZosungIRControl” cluster and the “IRLearn” command. Your dialog now should look like this:

Screenshot of the manage zigbee device

Press “Issue Zigbee command” and then the blue led should start to light up, indicating that the device is waiting for an IR code.

After you pressed a button on the remote, you can see the code in the attributes tab. For that you have to select last_learned_ir_code in the dropdown and press the read attribute button.

You can now test the code by selecting the “IRSend” command and paste the code into the “code” field. Click on “Issue Zigbee command” and the device should send the IR code.

If everything works, you can now create a script to send the code. For that you need to grab the ieee code that is shown in the device info box after you expanded the “Zigbee info”. The cluster_id is the ID of the ZosungIRControl cluster, in my case 0xe004. Convert that to decimal and you get 57348. The command in my case is “IRSend (id: 0x0002)”, which translates to decimal 2 and the command type is always “server”.

The final script should look like this:

service: zha.issue_zigbee_cluster_command
metadata: {}
  cluster_type: in
  ieee: 90:39:5e:ff:fe:0b:e4:cc
  endpoint_id: 1
  command: 2
  command_type: server
  cluster_id: 57348 # = 0xe004
    code: >-

Now you have everything you need to control your IR devices.

Portrait photo of Bodo Tasche
Bodo Tasche
Polyglot Developer

I am a freelance polyglot developer and love HTML5, testing, TypeScript, Ruby and Elixir. In the last 20 years I have been in lots of different roles, from Java to Elixir, from backend developer at a 3 people team in an early phase startup to the CTO of a web agency. Some of my work can be seen on my projects page.

Need help developing your MVP or to add new features into your current app? Need a CTO or a front/backend developer for hire? Send me an email.