This is a blueprint for Tuya TS004F 1-Button Smart Switch using Zigbee2MQTT with MQTT Device Triggers.
Compatible Models
- TS004F - Tuya/Moes Smart Button (1-button version)
- Manufacturers:
_TZ3000_ja5osu5g,_TZ3000_kjfzuycl - Commercial names:
- MOES Smart Button (ZT-SY-SR-MS)
- MOES ERS-10TZBVB-AA
- Loginovo ZG-101ZL
- Tuya Wireless Scene Switch (1 button version)
Supported Actions
- Single press
- Double press
- Long press (hold ~2 seconds)
Get Started
Click the badge to import this Blueprint:
Or manually import using this URL:
https://raw.githubusercontent.com/ferezvi/HA-Blueprints/main/TS004F_1_Button.yaml
How to Use
- Import the blueprint using the button above
- Press your button at least once (each action type: single, double, long) after pairing it with Zigbee2MQTT - this allows Home Assistant to discover available triggers
- Create an automation from the blueprint
- Select your button device from the dropdown
- Configure actions for each press type
- Done!

Requirements
- Home Assistant with Zigbee2MQTT integration
- TS004F button paired with Zigbee2MQTT
- Does NOT require legacy entities (future-proof)
Features
Visual device selector (no need to write MQTT topics manually)
Uses official MQTT Device Triggers (recommended by Zigbee2MQTT)
No legacy/deprecated features
Supports multiple button formats (single/1_single, etc.)
Restart mode for reliable trigger handling
Troubleshooting
Button not appearing in selector?
- Make sure itβs paired with Zigbee2MQTT
- Press each button action at least once
- Refresh the automation page
Actions not triggering?
- Check Zigbee2MQTT logs to see if events are being published
- Verify the button is sending actions in MQTT
- Try pressing the button multiple times
Notes
Based on community blueprints and adapted for single-button TS004F models. Tested and working great - feels even faster than ZHA! ![]()
GitHub Repository: GitHub - ferezvi/HA-Blueprints: Personal Blueprints for Home Assistant
Feel free to report issues or suggest improvements!