The devices: 2x Aqara Wireless Mini Switch T1, Matter-paired — one in the Master Bedroom, one in Guest Room North.
Master Bedroom button — 3 gestures, 3 jobs:
- Single press → toggles the bedroom lights on/off
- Double press → triggers your Alexa “Good Morning” routine
- Long press → triggers your Alexa “Good Night” routine
Guest Room North button — same 3-gesture pattern, but the single press is smarter:
- Single press is asymmetric, not a plain toggle: if the lights are on, it turns off the light, the table lamp, a “auto lights” helper, and a wax-warmer plug in that room — but pressing again to turn the lights back on deliberately leaves the plug alone, so you can’t accidentally re-arm a heating element with one press
- Double/long press → same Good Morning / Good Night Alexa triggers
Problem it solved: physical control for people who don’t want to use voice commands at night, plus one button covering both “control this room” and “kick off a whole-home routine” without reaching for a phone or talking to Alexa in the dark.
The engineering detail that’d actually be interesting to share
- Discovered the T1 fires a burst of 2-3 near-duplicate button events within single-digit milliseconds for one physical press — not obvious from the spec sheet. Had to add a self-debounce (reject any repeat trigger within 1 second) so a single press doesn’t get counted twice or dropped.
- Also learned that Home Assistant’s attribute-based triggers don’t work for these multi-press buttons the way you’d expect — you need to watch the whole entity state and filter on the press-type attribute separately, or repeated same-type presses (e.g. two single-clicks in a row) only fire once.
- Most recently: found that relying on Alexa’s own routine to turn the lights off wasn’t reliable, so the light control now happens directly in Home Assistant as a backstop, with Alexa still handling the rest of the routine.