I would like to ask about the automatic setting problem in Zha mode - aqara dynamic and static paste three click trigger

The cc2652p gateway is accessed under homeassistant. The Zha mode is used. The aqara green rice dynamic and static sensors are accessed. The three click operation can be recognized normally. However, there is no three click option operation in automation. Do you need to write your own code to realize automation? How should I operate? I hope the great God will give me directions. Thank you. I am preparing to trigger the specified operation with three strikes. In the log, I can recognize the action of three strikes, but it is not in the automatic operation configuration.

You have to use zha_event data to register the button presses.

Go to the events page in developers tools and listen for those events. You will see data populate there when you press the button.

Then use that data in your automation triggers.

Thank you. Which service should use in the developer mode

click “start listening”.

Push buttons on the device.

you will see like the following:

Then use the trigger type as event with the data for your device from the event data.

example:

automation:
  - alias: LC Computer Room Corner Light Relay
    trigger:
      - platform: event
        event_type: zha_event
        event_data:
          device_ieee: "00:15:8d:00:02:90:07:23"
          command: single
    action:
      - service: light.toggle
        entity_id: light.comp_corner_lamp_1df9

Thank you for your help. I have achieved it. It’s cool.

1 Like