Zigbee2MQTT - 4-Button Switch (Conditions, Debounce & Collapsible UI)

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.

:glowing_star: Features

  • 12 Actions: Supports single, double, and hold for 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.

:clipboard: 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).

:rocket: Import Blueprint

Open your Home Assistant instance and show the blueprint import dialog with a specific blueprint pre-filled.

:laptop: Manual Installation (Gist)

If you prefer to install it manually, you can find the Gist here:
GitHub Gist: Zigbee2MQTT 4-Button Switch


:light_bulb: How to use:

  1. Create a new automation using this blueprint.
  2. Enter your MQTT topic (replace SOMETHING with your exact device name from Z2M).
  3. Expand the sections for the buttons you want to use and add your actions (and optional conditions).
  4. 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!