KoMi Kojima SPB-ZGB-W Button Blueprint (ZHA)
This blueprint provides full support for the KoMi Kojima SPB-ZGB-W Zigbee button connected via ZHA. It handles single, double, and long press actions with configurable debounce protection.
Features
- Single click (command:
toggle) - Double click (command:
on) - Long press (command:
off) - Configurable debounce (0.1 - 2.0 seconds) to prevent accidental double-triggering
- Device filtering - only shows compatible devices in the selector
- Clean implementation - filters out
attribute_updatedevents at trigger level
Requirements
- Home Assistant 2026.8.0 or later
- ZHA integration
- KoMi Kojima SPB-ZGB-W button (Tuya TS004F, manufacturer:
_TZ3000_wc3gjyp3)
Installation
Or manually import using this URL:
Usage
- Go to Settings → Automations & Scenes → Blueprints
- Click Import Blueprint and paste the URL above
- Create a new automation from this blueprint
- Select your KoMi Kojima SPB-ZGB-W button device
- Configure actions for single, double, and long press
- Adjust debounce delay if needed (default: 0.3s)
Technical Details
This blueprint uses three separate triggers with trigger.id for clean event filtering. It specifically ignores attribute_updated events that Tuya devices generate alongside actual button commands, ensuring reliable operation.
The debounce is implemented using mode: single with a configurable delay at the end of the action sequence, which is the recommended Home Assistant approach for preventing rapid re-triggering.
Troubleshooting
Button not showing in device selector?
- Verify your device manufacturer is exactly
_TZ3000_wc3gjyp3 - Verify your device model is exactly
TS004F - Check in Settings → Devices & Services → ZHA → [Your Device]
Actions not triggering?
- Check the automation trace to see which command is being received
- Some firmware versions may use different commands - adjust the blueprint accordingly
Source Code
Available on GitHub Gist
Changelog
v1.0 (2026-09-01)
- Initial release
- Support for single/double/long press
- Configurable debounce protection
- Device filtering by manufacturer and model