This blueprint provides a reliable power-cycle helper for IKEA KAJPLATS smart bulbs.
It allows you to trigger:
• 6 cycles → Factory reset / start new Zigbee pairing
• 12 cycles → Switch from Matter mode to Zigbee mode (legacy Zigbee)
The blueprint:
• Ensures a clean OFF start
• Uses exact ON-event counting (no off-by-one issue)
• Leaves the bulb powered ON at the end
• Works with smart plugs or relays
• Tested with Zigbee2MQTT
Important:
“Cycles” means how many times the bulb is powered ON (OFF → ON).
Example: cycles = 6 results in exactly 6 ON events total.
Tested with:
IKEA KAJPLATS bulbs
Home Assistant
Zigbee2MQTT
Import Blueprint:

1 Like
Fantastic blueprint — using a Home Assistant automation on a smart plug to put IKEA bulbs into pairing mode is a huge time saver. Instead of standing next to a lamp counting switch flips, just let HA do the work.
Hardware setup
Wall outlet 220V → Smart plug (HA controlled) → Lamp (E27 or E14 socket) → IKEA bulb
Works with any lamp that has a 220V plug. Use an E27 lamp for E27 bulbs, or a smaller table lamp with an E14 socket for E14 bulbs. Plug the lamp into a smart socket that is already available in Home Assistant:
The smart plug becomes your virtual switch — no wall switch involved at all.
Step 1: Import the Blueprint
- Set “Target Switch Entity” to the smart socket you want to control
- Hit SAVE
Step 2: Let HA search for new Zigbee device
- For ZHA: Add device
- For Zigbee2MQTT: Permit join
Step 3: Open blueprint, set Number of ON events (OFF → ON), then run script
Step 4: Wait for HA to discover the bulb
- Once the light bulb is discovered, name it and SAVE.
Step 5: Put your bulb into place
- Unplug the lamp.
- Unscrew the bulb.
- Install the bulb in the desired location.
- Control it from HA!
Timing settings in the blueprint
A short ON interval of about 700 ms combined with a longer OFF interval of about 1500 ms seems to work better than equal on/off times. Even if the bulb does not visibly light up with a 700 ms ON window, it still counts the ON/OFF events and can enter pairing mode. Test and post what settings work best for your hardware.
Feature suggestion for the blueprint: Bulb type selector
It would be really useful if the blueprint offered a selector at the top:
Old IKEA Zigbee bulb (Trådfri etc.) → runs Phase 1 only (6 cycles)
New IKEA Matter bulb (Kajplats) → runs Phase 1, 10 sec delay, runs Phase 2 (6 + 12 cycles)
This would make the blueprint a universal IKEA bulb pairing tool, covering both past and present bulbs. Would you be open to adding this? Happy to help test if useful.