Smart Button, Smart Ideas
Your home can think, sense, and feel; now it will take orders. The Zigbee smart button is a tiny remote that does one thing well: trigger automations. It recognizes single press, double press, and long press, giving you three separate actions from one button. In this lesson you will pair it, test its press types, and map each to a different smart-home action like a lamp, a movie scene, or an all-off command.
One button, three triggers
The smart button looks simple but distinguishes three kinds of input: a single press, a double press, and a long press (holding it down). That gives you three independent triggers from one device, each assignable to whatever you like. The button has no other purpose than to fire automations, which is exactly what makes it flexible: it is a physical shortcut for any routine your home can perform.
Mapping presses to actions
You decide what each press does. A common setup is a single press to toggle a lamp, a double press to set a movie mode that dims the RGB bulbs to blue and starts a fan if it is warm, and a long press to shut everything off, every plug and bulb, when you leave or go to bed. Because the button is small and battery-powered, you can keep one on a desk, by the bed, or next to the door, so the right shortcut is always within reach.
Testing before you build
Before assigning actions, pair the button and watch the logs while you press it. Do a single click, a double click, and a long hold, and confirm each shows the correct trigger type. Verifying this first means that when your automations do not fire later, you already know the button and its press detection are fine and the issue is in the automation.
Working through it
Pair the button. Add it through ZHA, entering pairing mode by holding it for several seconds, then name it (like scene button) and assign a room.
Test the press types. Open the button in Home Assistant and press single, double, and long while watching that each registers the right trigger type.
Assign the single press. Create an automation with the trigger set to single press and the action to toggle a lamp's smart plug.
Assign the double press. Create an automation on double press that activates a movie scene, dimming the bulbs and starting a fan if needed.
Assign the long press. Create an automation on long press that turns off every plug and bulb, an instant all-off for leaving or bedtime.
One button, three actions
# Single press: toggle the lamp
trigger: { platform: device, type: remote_button_short_press }
action: { service: switch.toggle, target: { entity_id: switch.lamp_plug } }
# Double press: movie scene
trigger: { platform: device, type: remote_button_double_press }
action: { service: scene.turn_on, target: { entity_id: scene.movie_mode } }
# Long press: turn everything off
trigger: { platform: device, type: remote_button_long_press }
action:
- service: light.turn_off
target: { entity_id: all }
- service: switch.turn_off
target: { entity_id: all }
Each press type is a separate trigger mapped to its own action: toggle a lamp, run a scene, or shut everything off. The exact trigger names appear when you test the button, so use what shows in your logs.
Common mistakes and troubleshooting
Cannot tell if the button is in pairing mode. Hold it for several seconds and start Add Device in ZHA; watch Home Assistant for it to appear even if the button has no obvious light.
An automation never fires. Test the press types first; if they register in the logs, the problem is in the automation, not the button.
The wrong action runs for a press. Check that each automation's trigger matches the intended press type (single, double, or long).
Next: Next you will connect last month's AI camera detection directly to your smart home.