ZHA IR Learner – learn Tuya ZS06 / TS1201 IR remote buttons and save them as scripts (one HTML file, no integration)

Learning IR codes with a Tuya ZS06 / TS1201 Zigbee IR blaster in ZHA usually means: issue the IRLearn command in “Manage Zigbee clusters”, read the long last_learned_ir_code
attribute, copy it, and write a script by hand. For every single button.

So I made a small page that does it for you:

  1. Type a name (e.g. “TV power”), optionally pick an area and labels, press Learn
  2. Point the original remote at the blaster and press the button once
  3. A regular Home Assistant script is created automatically (script.ir_btn_tv_power), already in that area and with those labels

Learned buttons are listed grouped by blaster, with Test / Edit / Delete.

What it is

  • A single HTML file you drop into /config/www/ and add as a Webpage dashboard (/local/ir-learner.html)
  • No custom integration, no HACS, no restart. It uses HA’s own APIs with your logged-in session
  • Auto-detects TS1201 blasters in ZHA (several blasters supported)
  • English and Spanish UI, light and dark theme
  • MIT licensed

Requirements

  • ZHA (not Zigbee2MQTT)
  • Your HA user must be an administrator (the page creates scripts and sets areas/labels)
  • Tested with the Tuya ZS06 _TZ3290_7v1k4vufotpowp9z. Other TS1201 variants handled by the zhaquirks.tuya.ts1201 quirk should work, but I haven’t tested them. Feedback welcome!

If you need a full command library with native remote entities, have a look at IR Learning Hub (linked in the README). This one is meant to be the lightweight option.

GitHub, with install steps and screenshots: GitHub - cleydar-creator/zha-ir-learner: Learn IR remote buttons with a Tuya ZS06 (TS1201) Zigbee IR blaster in Home Assistant ZHA and save each one as a script — single HTML page, no integration needed. · GitHub