If you are not using ZHA, then you will never see a zha_event trigger. According to the zigbee2mqtt documentation there isn’t an event, instead you have to trigger from an state change.
Thanks for sharing!
It actually took me some time to get it running as I’m quite a noob in HA, but I think I managed.
Important note which was missing is to add a counter! From Settings->Device&Services → Helpers → one needs to add a counter with ID “zha_button_click” with some min/max values (I used 0/20). Otherwise the script doesn’t work.
That’s a good point @lega4! At the time of this post, helpers could only be defined in the configuration.yaml file. That’s a nice reminder of how far Home Assistant has come.
I’m glad you were able to find it useful!
Hi,
I just wanted to say thanks Brian. This code you have shared looks very interesting and I hope to start using it pretty soon.
Regards Robert
Thanks, Brian! I successfully used your concept to set up a couple of Philips Hue Tap Dial Switches. I really appreciate your work!