Automation with zha_event never triggers

Hi,

I successfully paired a 3 button remote switch : LoraTap Remote 3 Button (SS600ZB) Zigbee compatibility
The short and double press are properly recognized in HA with ZHA, and the corresponding events are proposed when using this device as a trigger for an automation.

However, this remote switch has a long press, which is not proposed in the GUI. Not the long press start event but only the long end event.

But if I listen to zha_event, I have this:

{
    "event_type": "zha_event",
    "data": {
        "device_ieee": "84:fd:27:ff:fe:36:1a:25",
        "unique_id": "84:fd:27:ff:fe:36:1a:25:1:0x0006",
        "device_id": "6106734888b365d80c8eb252f9d10d7c",
        "endpoint_id": 1,
        "cluster_id": 6,
        "command": "remote_button_long_press",
        "args": []
    },
    "origin": "LOCAL",
    "time_fired": "2021-06-13T07:31:16.602005+00:00",
    "context": {
        "id": "f34f2413126fcd1fa6ef64d5c36993cc",
        "parent_id": null,
        "user_id": null
    }
}

My problem is that if I create an automation based on this event, it never gets triggered.

Here is the automation code:

alias: Test long press zha_event
description: ''
trigger:
  - platform: event
    event_type: zha_event
    event_data:
      device_ieee: 84:fd:27:ff:fe:36:1a:25,
      endpoint_id: 1,
      command: remote_button_long_press,
      args: []
condition: []
action:
  - service: cover.stop_cover
    target:
      device_id: 433aab9ab7fb1aee9c524091d0c782ab
mode: single

Any clue?
Thanks!

c/p monster :slight_smile:
Remove the superfluous commas

:man_facepalming:

Many thanks, it works now!

Rather than creating a new post, this one aligns the closest to my requirements… so here goes.

I have the LoraTap Remote 3 Button SS600ZB and have been able to pair it with my Zigbee coordinator, however so far the only information I am seeing is the battery status for the LoraTap Remote. Have done a bit of digging around, but am unable to find anything relating to the buttons?

My use case is this… I installed some WS2812B LED’s connected to a Wemos Mini running esphome in my daughters bedroom. The setup has a motion sensor so acts as a night light when it detects movement.

This all works great… but my 7 year old daughter asked if I could add a button to make the LED’s do other light sequences. So of course Dad (me) said no problem, and here I am.

Basically looking for the remote buttons to be pressed, and the Wemos Mini to run different light sequences i.e. flash, strobe etc. So I am wondering, is this an automation via HA, or can the remote button press somehow be sent directly to the Wemos Mini?

As always, appreciate any advice/guidance.

As you can see above, button presses come as events.
Don’t you get them, or don’t you know how to use events?

Hi @koying I can see the button presses on zha_event so no problem there, the LoraTap is definitely working.

I am just wondering whether I can interface that ZHA event directly with the Wemos Mini or if I must go via HA? All I want to happen, is when my daighter presses a button, the Wemos Mini triggers the WS2812B LED’s to do a particular light/colour sequence.

Haven’t done this before, so am looking at options, and possibly experience from those that have done this previously.

No. Zigbee and Wifi cannot talk to each other. You need a gateway in-between and HA is doing that.

Hi Chris @koying let me clarify further… I wasn’t expecting the Zigbee and Wifi to interface as I understand the protocol differences. What I meant was… the button press is detected within Home Assistant and is somehow pushed to the Wemos Mini, via MQTT / API etc.

I figure if I can see the button press within zha_event then that event should be able to be ‘seen’ by other devices? So when I said interface that ZHA event directly with the Wemos mini, I didn’t mean directly from a Zigbee/Wifi perspective, more wanting to avoid a HA Automation doing the work.

Hope this helps explain.

Not clear what magic you actually have in mind to instruct the wemo to react to the button press, but anyway automations is how you will “glue” the 2 devices in HA.