@Luke001IT I had the same issue as I’m not using ZHA but zigbee2mqtt, too. After trying a lot of different options that were not working, I eventually found out the following automation using templating works. I’m still working on improving this so you don’t need three automations for each button .
alias: Turn on light
description: ''
trigger:
- platform: event
event_type: state_changed
context: {}
event_data:
entity_id: sensor.sonoff_switch_01_action
condition:
- condition: state
entity_id: sensor.sonoff_switch_01_action
state: single
action:
- service: light.toggle
data: {}
target:
entity_id: light.book_leds_wlightboxs_brightness
mode: single
My experience with a Xiaomi WXKG11LM in Zigbee2MQTT might be similar to your SONOFF SNZB-01. I still do not have as solid an automation with this switch as I would like but two scripts below show the direction I have gone to try and use a single click as well as a double click from the Xiaomi. I am using the ‘trigger.to_state’ event as shown. I am finding that being able to capture the various ‘clicks’ and ‘twists’ of these wireless control devices is a bit hard. Good hunting!
I know it’s been a while since people sorted this one out, but I have a couple of these moes buttons and I can’t get them to work. I’m using a zigbee2mqtt and it pairs fine, I can see the device in HA and it only shows a batter state change, but I can’t see the click events when I listen to all events.
Not sure what is happening here, and if there is something else I need to change, but I guess without seeing an event I’m not going to be able to get it working?