mahodk
(Mads Hommelgaard)
November 9, 2025, 2:01pm
1
Getting back into HomeAssistant after a few years - New house → New HA setup. I am running ZHA and all devices seem to pair nicely.
I have a simple automation to turn on a light relay, which should be triggered by a button press. Button is an Aqara Wireless Mini Switch T1 .
When I press the button a Toggle event is fired in the activity log:
But in the Automation I cannot select “Toggle” as the trigger - only short press or long press and none of these work as trigger:
I am not sure if this is configuration issue or I simply messed up.
I was running zigbee2mqtt earlier and perhaps I should just switch back to that?
Hoping someone can help - This is pretty simple and should work
Any help / hint is appreciated!
Arh
November 9, 2025, 2:12pm
2
Sorry my reply was wrong, and i cant work out how to delete it
Sir_Goodenough
((SG) WhatAreWeFixing.Today)
November 9, 2025, 6:03pm
3
Hello
Could you possibly show us your YAML so we can get a better idea what is happening?
3 dots
edit in yaml
copy
paste here using the</> key in the post editor.
If the Device trigger isn’t working, you can always use an Event trigger . You can get the details of the events the button posts to the event bus by using the Events tool . You will need to set it to listen for zha_event in the " Listen to events" field.
mahodk
(Mads Hommelgaard)
November 9, 2025, 7:04pm
5
Sure - Here is the yaml for the Automation:
alias: Workshop Remote Light
description: ""
triggers:
- device_id: 2c1622a3601edddbfbbed92ceee56b69
domain: zha
type: remote_button_short_press
subtype: remote_button_short_press
trigger: device
id: Toggle Event
conditions: []
actions:
- type: toggle
device_id: d3224c52612382a707e0fde86bef71d3
entity_id: 9aa4e7b5ef695b618172e22547815954
domain: light
mode: single
mahodk
(Mads Hommelgaard)
November 9, 2025, 7:35pm
6
Thanks @Didgeridrew !
Using the event tool I was able to capture the zha_event and create a manual event that works.
For others - in case you are new to HomeAssistant - may be trivial for most of you…:
Go to Developer Tools and select Events in the top bar
In the Listen to add “zha_event” and press Start Listening
Go press your button / other trigger you want to capture
You should get an “Event X fired” in the Events log
In the log copy the data portion, ie. the indented section after “data:”
Go to your Automation select “+ Add trigger” and then “… Other Triggers”
Select Manual Event - add a name for your trigger under Trigger ID (optional)
Set Event type to “zha_event” and paste the data portion copied earlier into the Event data code section
I left user empty.
Voila - Light turns on at the press of the button!
Thanks again for the help!