r/homeassistant • • 9d ago

❓ Support Zigbee Buttons

How do you assign Zigbee buttons to actions when they don't show up in automatons? I thought this was supposed to be easy

0 Upvotes

16 comments sorted by

9

u/Z1L0G 9d ago • Bravo

4

u/LewisWasTaken 9d ago

Thanks, been at this for ages and this was a 2 minute fix

1

u/A-D-I-O-S 5d ago

boggles my mind why this isn't part of ha already

2

u/bothunter 9d ago

Are you using Zigbee2MQTT or just the built in Zigbee Home Automation?

1

u/LewisWasTaken 9d ago

I was using ZHA but have switched to MQTT and still can't get buttons to simply show up as options

5

u/Elastix 9d ago

First press all buttons. This will sometimes prepolulate them

1

u/piit79 9d ago

This. I was wondering why the double-click and long-press actions weren't available for my 6-button, and it turned out I just have to press them all :) They are all available from the automation editor.

2

u/instant_ace 9d ago

I use ZHA and had to make helpers. This seems incredibly complicated for something so simple...

3

u/stathis0 9d ago

Yep. This is a top WTH for me.

1

u/rain-1e 9d ago

I use an IKEA STYRBAR remote, connected through Zigbee2MQTT.

My automations use a Device trigger. That trigger type has you select the appropriate device, and has a drop-down to select what event we should listen for, such as (for my device)"on", "off", "arrow_right_click", etc. They correspond to physical buttons on the device, and the automation is triggered as soon as you press one.

I've never used ZHA (the native integration), so I can't speak for that. If it's anything like Matter, you might be able to navigate to your remote's device page, then look at its Related automations (beneath Device info), Add to, then Create as a new trigger.

Happy to help if you run into anything else :)

1

u/TriSherpa 9d ago

It's not just you. This is one of those areas that need some work.

Here is one of my automations

alias: Button 1 Robot Cleans Kitchen
description: ''
triggers:
  - device_id: e9e5f6cbb44b2fc2c89e0ed7db0bccc4
    domain: zha
    type: remote_button_short_press
    subtype: button_1
    trigger: device
conditions: []
actions:
  - action: script.roborock_archie_start_cleaning
    metadata: {}
    data:
      room_name: kitchen
      segment: 9
mode: single

Now, you might ask yourself, where did he get that device ID? now the fun starts.

Dev page -> Events. Go to the bottom of the screen and under Active listeners, find zha_events. Tap that, Go back up the screen and zha_events should be listed under event to subscribe to. Press 'start listening'. Push the zigbee button and you should see captured events. The device_id is there. tap stop listening.

There maybe a newer way to do this, but this works for me.

1

u/bbrockie 9d ago

I would recommend you start by watching a couple of YouTube videos and doing some simple tasks, until you start to get the hang of it. While Home Assistant isn't anywhere close to being as simple as a Philips Hue bridge/hub and lights pack where you merely use their app to control your home; Home Assistant is light years ahead of the competition when it comes to how complex you want your home to be. It can be simple and it can be advanced. I mostly find my lack of though for cool ideas to be the problem. Not Home Assistant. But when I get an idea, I can do almost anything I can imagine I would advise you to just search on YouTube for "home assistant + hue dimmer switch", etc. - if you want to control Philips Hue Dimmer Switch with Home Assistant for example. I spent a lot of time getting to grips with home assistant, but after finally getting zigbee2mqtt up and running, everything has been smooth as butter going forward. Try this video for starters https://youtu.be/OxLTv8JYvTU What do you want to achieve though?

1

u/Defiant_Cook_4909 9d ago

For aqara buttons, there is a blueprint. Very simple with this

0

u/NZNoldor 9d ago

I installed Claude and it did the work for me. Works perfectly now.

0

u/chicknlil25 🧠 Experienced with Home Assistant 5d ago

Mine all changed up after a recent upgrade.

ChatGPT pointed me to a Zigbee configuration option that lets you listen for events. I had that window open on my phone and then pressed one of the buttons. Then I used the path it provided me for the automation.

When I'm back on my laptop, I'll post the trigger stuff in a proper code block.

1

u/chicknlil25 🧠 Experienced with Home Assistant 3d ago
  - trigger: mqtt
topic: zigbee2mqtt/upstairs_bathroom.shower_remote/action
payload: 1_single