Hi everyone,
I created a blueprint to easily manage a 4-Button Switch (like Tuya, Moes, IKEA, etc.) via Zigbee2MQTT.
While there are some blueprints out there for specific remotes, I wanted one that is highly customizable, keeps the UI clean, and includes some advanced features like debouncing and conditional actions.
Features
- 12 Actions: Supports
single,double, andholdfor all 4 buttons. - Collapsible UI: All 12 actions are grouped into neat accordion sections. Your automation UI stays clean, even if you donโt use all buttons.
- Optional Conditions: Every single action can have its own condition. E.g., Button 1 only turns on the TV if itโs after sunset.
- Debounce/Cooldown Timer: A built-in, adjustable delay prevents accidental double-triggers or hardware ghost-bouncing.
Prerequisites
- The switch must be integrated via Zigbee2MQTT.
- You need to know the MQTT base topic of your switch (usually
zigbee2mqtt/YOUR_DEVICE_NAME/action).
Import Blueprint
Manual Installation (Gist)
If you prefer to install it manually, you can find the Gist here:
GitHub Gist: Zigbee2MQTT 4-Button Switch
How to use:
- Create a new automation using this blueprint.
- Enter your MQTT topic (replace
SOMETHINGwith your exact device name from Z2M). - Expand the sections for the buttons you want to use and add your actions (and optional conditions).
- Adjust the debounce delay if your switch sends duplicate payloads (default is 0.1s).
Let me know if you run into any issues or have ideas for improvements!