ZHA identify event additional data (click_type) for automation

I am trying to build automation based on "zha_event"s received from from my Xiaomi Mi Switch - trying to figure out how to distinguish “single” / “double” / “hold” click actions…

Should I do that in the trigger ? in a command ?
any example could help :slight_smile:

Event 13 fired 5:47 PM:
{
    "event_type": "zha_event",
    "data": {
        "unique_id": "0x059f:1:0x0006",
        "device_ieee": "00:15:8d:00:01:25:63:f6",
        "command": "click",
        "args": {
            "click_type": "double"
        }
    },
    "origin": "LOCAL",
    "time_fired": "2019-06-09T14:47:48.651971+00:00",
    "context": {
        "id": "7aa09b79085a44cd8c1ed7ed243a39b5",
        "parent_id": null,
        "user_id": null
    }
}

Event 9 fired 5:47 PM:
{
    "event_type": "zha_event",
    "data": {
        "unique_id": "0x059f:1:0x0006",
        "device_ieee": "00:15:8d:00:01:25:63:f6",
        "command": "click",
        "args": {
            "click_type": "single"
        }
    },
    "origin": "LOCAL",
    "time_fired": "2019-06-09T14:47:27.221229+00:00",
    "context": {
        "id": "ad2de1e3c6ba411a912d130d3220b3e4",
        "parent_id": null,
        "user_id": null
    }
}
1 Like

You should include the arguments in your trigger as they are different. I use node-red with “payload.event.args” and “contains” but you should be able to do the same in your automation by including them. Something like this might work, although you may have to format the args differently to include “click_type” as well.

- alias: MiDouble
  trigger:
  - event_data:
      args:
      - double
    command: click
    device_ieee: 00:15:8d:00:01:25:63:f6
    event_type: zha_event
    platform: event
  action:
  - data:
    entity_id: light.some_light
    service: light.turn_on

- alias: MiSingle
  trigger:
  - event_data:
      args:
      - single
      command: click
      device_ieee: 00:15:8d:00:01:25:63:f6
    event_type: zha_event
    platform: event
  action:
  - data:
    entity_id: light.some_light
    service: light.turn_off

3 Likes

Would you mind posting a copy of your flow for this please?

@getsmokes - I don’t have one for this specific device, but here are some flows of mine using zha_event listener and then using a switch node to identify and sort based on args. Hope this helps. On a somewhat related note, I’ve mostly abandoned this approach (although it works well) for most remotes and instead use ControllerX in AppDaemon as I find it faster to do with less configuration, especially if you have many remotes.

[
    {
        "id": "dca4b308.456bf",
        "type": "api-call-service",
        "z": "7a66c3a0.b7162c",
        "name": "Kitchen Table",
        "server": "b3217b27.630be8",
        "version": "1",
        "debugenabled": false,
        "service_domain": "light",
        "service": "toggle",
        "entityId": "light.kitchen_table_lights",
        "data": "",
        "dataType": "json",
        "mergecontext": "",
        "output_location": "",
        "output_location_type": "none",
        "mustacheAltTags": false,
        "x": 1000,
        "y": 260,
        "wires": [
            []
        ]
    },
    {
        "id": "ba747c39.b24b",
        "type": "api-call-service",
        "z": "7a66c3a0.b7162c",
        "name": "Kitchen Island",
        "server": "b3217b27.630be8",
        "version": "1",
        "debugenabled": false,
        "service_domain": "light",
        "service": "toggle",
        "entityId": "light.kitchen_island_lights",
        "data": "",
        "dataType": "json",
        "mergecontext": "",
        "output_location": "",
        "output_location_type": "none",
        "mustacheAltTags": false,
        "x": 1000,
        "y": 300,
        "wires": [
            []
        ]
    },
    {
        "id": "a3e1398a.bfaab8",
        "type": "api-call-service",
        "z": "7a66c3a0.b7162c",
        "name": "Kitchen Nook",
        "server": "b3217b27.630be8",
        "version": 1,
        "debugenabled": false,
        "service_domain": "switch",
        "service": "toggle",
        "entityId": "switch.kitchen_nook",
        "data": "",
        "dataType": "json",
        "mergecontext": "",
        "output_location": "",
        "output_location_type": "none",
        "mustacheAltTags": false,
        "x": 990,
        "y": 220,
        "wires": [
            []
        ]
    },
    {
        "id": "1ea4600f.43ae5",
        "type": "switch",
        "z": "7a66c3a0.b7162c",
        "name": "Click Type",
        "property": "payload.event.command",
        "propertyType": "msg",
        "rules": [
            {
                "t": "eq",
                "v": "button_single",
                "vt": "str"
            },
            {
                "t": "eq",
                "v": "button_double",
                "vt": "str"
            },
            {
                "t": "eq",
                "v": "button_hold",
                "vt": "str"
            }
        ],
        "checkall": "true",
        "repair": false,
        "outputs": 3,
        "x": 750,
        "y": 260,
        "wires": [
            [
                "a3e1398a.bfaab8"
            ],
            [
                "dca4b308.456bf"
            ],
            [
                "ba747c39.b24b"
            ]
        ]
    },
    {
        "id": "59236fc9.73ae6",
        "type": "switch",
        "z": "7a66c3a0.b7162c",
        "name": "SmartThings Button",
        "property": "payload.event.device_ieee",
        "propertyType": "msg",
        "rules": [
            {
                "t": "eq",
                "v": "28:6d:97:00:01:04:4a:a9",
                "vt": "str"
            }
        ],
        "checkall": "true",
        "repair": false,
        "outputs": 1,
        "x": 500,
        "y": 280,
        "wires": [
            [
                "1ea4600f.43ae5"
            ]
        ]
    },
    {
        "id": "de2429e9.e6e878",
        "type": "server-events",
        "z": "7a66c3a0.b7162c",
        "name": "ZHA Event Listener",
        "server": "b3217b27.630be8",
        "event_type": "zha_event",
        "x": 230,
        "y": 140,
        "wires": [
            [
                "59236fc9.73ae6",
                "fd7dc985.d34168",
                "1e6d5c24.1a7054"
            ]
        ]
    },
    {
        "id": "b117b8f3.33bbf8",
        "type": "api-render-template",
        "z": "7a66c3a0.b7162c",
        "name": "Dim",
        "server": "b3217b27.630be8",
        "template": "{{ [10, state_attr('light.office_work_light', 'brightness')|int(0) - 26]|max }}",
        "resultsLocation": "payload",
        "resultsLocationType": "msg",
        "templateLocation": "template",
        "templateLocationType": "msg",
        "x": 1050,
        "y": 440,
        "wires": [
            [
                "1f295def.eab742"
            ]
        ]
    },
    {
        "id": "1f295def.eab742",
        "type": "api-call-service",
        "z": "7a66c3a0.b7162c",
        "name": "Office Work Light DOWN",
        "server": "b3217b27.630be8",
        "version": "1",
        "debugenabled": false,
        "service_domain": "light",
        "service": "turn_on",
        "entityId": "light.office_work_light",
        "data": "{\"brightness\":\"{{payload}}\"}",
        "dataType": "json",
        "mergecontext": "",
        "output_location": "",
        "output_location_type": "none",
        "mustacheAltTags": false,
        "x": 1290,
        "y": 440,
        "wires": [
            []
        ]
    },
    {
        "id": "187bc16d.726b0f",
        "type": "switch",
        "z": "7a66c3a0.b7162c",
        "name": "Left or Right",
        "property": "payload.event.args",
        "propertyType": "msg",
        "rules": [
            {
                "t": "eq",
                "v": "0,1,13,0",
                "vt": "str"
            },
            {
                "t": "eq",
                "v": "1,1,13,0",
                "vt": "str"
            }
        ],
        "checkall": "true",
        "repair": false,
        "outputs": 2,
        "x": 870,
        "y": 420,
        "wires": [
            [
                "c83636a0.fb7358"
            ],
            [
                "b117b8f3.33bbf8"
            ]
        ]
    },
    {
        "id": "802c6f0f.7db3d",
        "type": "api-render-template",
        "z": "7a66c3a0.b7162c",
        "name": "Brighten",
        "server": "b3217b27.630be8",
        "template": "{{ [255, state_attr('light.office_work_light', 'brightness')|int(0) + 26]|min }}",
        "resultsLocation": "payload",
        "resultsLocationType": "msg",
        "templateLocation": "template",
        "templateLocationType": "msg",
        "x": 860,
        "y": 360,
        "wires": [
            [
                "c2171733.0bb528"
            ]
        ]
    },
    {
        "id": "c83636a0.fb7358",
        "type": "api-render-template",
        "z": "7a66c3a0.b7162c",
        "name": "Brighten",
        "server": "b3217b27.630be8",
        "template": "{{ [255, state_attr('light.office_work_light', 'brightness')|int(0) + 26]|min }}",
        "resultsLocation": "payload",
        "resultsLocationType": "msg",
        "templateLocation": "template",
        "templateLocationType": "msg",
        "x": 1060,
        "y": 400,
        "wires": [
            [
                "c2171733.0bb528"
            ]
        ]
    },
    {
        "id": "c2171733.0bb528",
        "type": "api-call-service",
        "z": "7a66c3a0.b7162c",
        "name": "Office Work Light UP",
        "server": "b3217b27.630be8",
        "version": "1",
        "debugenabled": false,
        "service_domain": "light",
        "service": "turn_on",
        "entityId": "light.office_work_light",
        "data": "{\"brightness\":\"{{payload}}\"}",
        "dataType": "json",
        "mergecontext": "",
        "output_location": "",
        "output_location_type": "none",
        "mustacheAltTags": false,
        "x": 1280,
        "y": 360,
        "wires": [
            []
        ]
    },
    {
        "id": "91632225.4549d",
        "type": "api-render-template",
        "z": "7a66c3a0.b7162c",
        "name": "Dim",
        "server": "b3217b27.630be8",
        "template": "{{ [10, state_attr('light.office_work_light', 'brightness')|int(0) - 26]|max }}",
        "resultsLocation": "payload",
        "resultsLocationType": "msg",
        "templateLocation": "template",
        "templateLocationType": "msg",
        "x": 870,
        "y": 460,
        "wires": [
            [
                "1f295def.eab742"
            ]
        ]
    },
    {
        "id": "13ddaa82.3f8e65",
        "type": "api-call-service",
        "z": "7a66c3a0.b7162c",
        "name": "Toggle",
        "server": "b3217b27.630be8",
        "version": "1",
        "debugenabled": false,
        "service_domain": "light",
        "service": "turn_on",
        "entityId": "light.office_work_light",
        "data": "{\"brightness_pct\":\"50\"}",
        "dataType": "json",
        "mergecontext": "",
        "output_location": "",
        "output_location_type": "none",
        "mustacheAltTags": false,
        "x": 880,
        "y": 520,
        "wires": [
            []
        ]
    },
    {
        "id": "2c48235e.c18d1c",
        "type": "switch",
        "z": "7a66c3a0.b7162c",
        "name": "Click Type",
        "property": "payload.event.command",
        "propertyType": "msg",
        "rules": [
            {
                "t": "eq",
                "v": "step_with_on_off",
                "vt": "str"
            },
            {
                "t": "eq",
                "v": "press",
                "vt": "str"
            },
            {
                "t": "eq",
                "v": "step",
                "vt": "str"
            },
            {
                "t": "eq",
                "v": "toggle",
                "vt": "str"
            }
        ],
        "checkall": "true",
        "repair": false,
        "outputs": 4,
        "x": 670,
        "y": 400,
        "wires": [
            [
                "802c6f0f.7db3d"
            ],
            [
                "187bc16d.726b0f"
            ],
            [
                "91632225.4549d"
            ],
            [
                "13ddaa82.3f8e65"
            ]
        ]
    },
    {
        "id": "fd7dc985.d34168",
        "type": "switch",
        "z": "7a66c3a0.b7162c",
        "name": "Ikea 5 Button Remote",
        "property": "payload.event.device_ieee",
        "propertyType": "msg",
        "rules": [
            {
                "t": "eq",
                "v": "d0:cf:5e:ff:fe:10:2d:61",
                "vt": "str"
            }
        ],
        "checkall": "true",
        "repair": false,
        "outputs": 1,
        "x": 460,
        "y": 400,
        "wires": [
            [
                "2c48235e.c18d1c"
            ]
        ]
    },
    {
        "id": "1e6d5c24.1a7054",
        "type": "switch",
        "z": "7a66c3a0.b7162c",
        "name": "Family Room Lamp Remote",
        "property": "payload.event.device_ieee",
        "propertyType": "msg",
        "rules": [
            {
                "t": "eq",
                "v": "ff:ff:00:0f:e7:ff:50:4b",
                "vt": "str"
            }
        ],
        "checkall": "true",
        "repair": false,
        "outputs": 1,
        "x": 520,
        "y": 20,
        "wires": [
            [
                "ef05a218.44eae"
            ]
        ]
    },
    {
        "id": "ef05a218.44eae",
        "type": "switch",
        "z": "7a66c3a0.b7162c",
        "name": "Click Type",
        "property": "payload.event.command",
        "propertyType": "msg",
        "rules": [
            {
                "t": "eq",
                "v": "move_to_level_with_on_off",
                "vt": "str"
            },
            {
                "t": "eq",
                "v": "step_with_on_off",
                "vt": "str"
            },
            {
                "t": "eq",
                "v": "step",
                "vt": "str"
            }
        ],
        "checkall": "true",
        "repair": false,
        "outputs": 3,
        "x": 810,
        "y": 40,
        "wires": [
            [
                "576c494c.b233a8"
            ],
            [
                "bcbb6397.d2d8d"
            ],
            [
                "c0ca892f.65e538"
            ]
        ]
    },
    {
        "id": "576c494c.b233a8",
        "type": "switch",
        "z": "7a66c3a0.b7162c",
        "name": "Top or Bottom",
        "property": "payload.event.args",
        "propertyType": "msg",
        "rules": [
            {
                "t": "cont",
                "v": "254",
                "vt": "str"
            },
            {
                "t": "cont",
                "v": "0",
                "vt": "str"
            }
        ],
        "checkall": "true",
        "repair": false,
        "outputs": 2,
        "x": 1020,
        "y": 20,
        "wires": [
            [
                "efbe94af.be8918"
            ],
            [
                "1ab29345.a5734d"
            ]
        ]
    },
    {
        "id": "efbe94af.be8918",
        "type": "api-call-service",
        "z": "7a66c3a0.b7162c",
        "name": "Family Room Lamps ON",
        "server": "b3217b27.630be8",
        "version": "1",
        "debugenabled": false,
        "service_domain": "light",
        "service": "turn_on",
        "entityId": "light.family_room_lamps",
        "data": "{\"brightness\":\"254\"}",
        "dataType": "json",
        "mergecontext": "",
        "output_location": "",
        "output_location_type": "none",
        "mustacheAltTags": false,
        "x": 1310,
        "y": 60,
        "wires": [
            []
        ]
    },
    {
        "id": "1ab29345.a5734d",
        "type": "api-call-service",
        "z": "7a66c3a0.b7162c",
        "name": "Family Room Lamps OFF",
        "server": "b3217b27.630be8",
        "version": "1",
        "debugenabled": false,
        "service_domain": "light",
        "service": "turn_off",
        "entityId": "light.family_room_lamps",
        "data": "",
        "dataType": "json",
        "mergecontext": "",
        "output_location": "",
        "output_location_type": "none",
        "mustacheAltTags": false,
        "x": 1310,
        "y": 120,
        "wires": [
            []
        ]
    },
    {
        "id": "9c9e04d3.885568",
        "type": "api-call-service",
        "z": "7a66c3a0.b7162c",
        "name": "Familty Room Lamps UP",
        "server": "b3217b27.630be8",
        "version": "1",
        "debugenabled": false,
        "service_domain": "light",
        "service": "turn_on",
        "entityId": "light.family_room_lamps",
        "data": "{\"brightness\":\"{{payload}}\"}",
        "dataType": "json",
        "mergecontext": "",
        "output_location": "",
        "output_location_type": "none",
        "mustacheAltTags": false,
        "x": 1310,
        "y": 180,
        "wires": [
            []
        ]
    },
    {
        "id": "ebe296db.b0a258",
        "type": "api-call-service",
        "z": "7a66c3a0.b7162c",
        "name": "Family Room Lamps DOWN",
        "server": "b3217b27.630be8",
        "version": "1",
        "debugenabled": false,
        "service_domain": "light",
        "service": "turn_on",
        "entityId": "light.family_room_lamps",
        "data": "{\"brightness\":\"{{payload}}\"}",
        "dataType": "json",
        "mergecontext": "",
        "output_location": "",
        "output_location_type": "none",
        "mustacheAltTags": false,
        "x": 1320,
        "y": 240,
        "wires": [
            []
        ]
    },
    {
        "id": "bcbb6397.d2d8d",
        "type": "api-render-template",
        "z": "7a66c3a0.b7162c",
        "name": "Brighten",
        "server": "b3217b27.630be8",
        "template": "{{ [255, state_attr('light.family_room_lamps', 'brightness')|int(0) + 26]|min }}",
        "resultsLocation": "payload",
        "resultsLocationType": "msg",
        "templateLocation": "template",
        "templateLocationType": "msg",
        "x": 1020,
        "y": 80,
        "wires": [
            [
                "9c9e04d3.885568",
                "4534b473.458ccc"
            ]
        ]
    },
    {
        "id": "c0ca892f.65e538",
        "type": "api-render-template",
        "z": "7a66c3a0.b7162c",
        "name": "Dim",
        "server": "b3217b27.630be8",
        "template": "{{ [10, state_attr('light.family_room_lamps', 'brightness')|int(0) - 26]|max }}",
        "resultsLocation": "payload",
        "resultsLocationType": "msg",
        "templateLocation": "template",
        "templateLocationType": "msg",
        "x": 1010,
        "y": 140,
        "wires": [
            [
                "ebe296db.b0a258",
                "4534b473.458ccc"
            ]
        ]
    },
    {
        "id": "4534b473.458ccc",
        "type": "stoptimer",
        "z": "7a66c3a0.b7162c",
        "duration": "750",
        "units": "Millisecond",
        "payloadtype": "num",
        "payloadval": "0",
        "name": "750 ms timer",
        "x": 1270,
        "y": 300,
        "wires": [
            [
                "1e6d5c24.1a7054"
            ],
            []
        ]
    },
    {
        "id": "b3217b27.630be8",
        "type": "server",
        "z": "",
        "name": "Home Assistant",
        "legacy": false,
        "rejectUnauthorizedCerts": true,
        "ha_boolean": "y|yes|true|on|home|open",
        "connectionDelay": true
    }
]
2 Likes

Thank you.

I do have a Xiaomi Aqara wall switch and a little bit different event. I tried several automation, someone knowing the right event?

Gebeurtenis 1 afgevuurd 21:33:
{
    "event_type": "zha_event",
    "data": {
        "device_ieee": "00:15:8d:00:01:5f:24:d1",
        "unique_id": "00:15:8d:00:01:5f:24:d1:1:0x0006",
        "endpoint_id": 1,
        "cluster_id": 6,
        "command": "attribute_updated",
        "args": {
            "attribute_id": 0,
            "attribute_name": "on_off",
            "value": 0
        }
    },
    "origin": "LOCAL",
    "time_fired": "2020-05-27T19:33:57.257341+00:00",
    "context": {
        "id": "ba083a020ada4abdb6d5f8593de1eca6",
        "parent_id": null,
        "user_id": null
    }
}
Gebeurtenis 0 afgevuurd 21:33:
{
    "event_type": "zha_event",
    "data": {
        "device_ieee": "00:15:8d:00:01:5f:24:d1",
        "unique_id": "00:15:8d:00:01:5f:24:d1:1:0x0006",
        "endpoint_id": 1,
        "cluster_id": 6,
        "command": "attribute_updated",
        "args": {
            "attribute_id": 0,
            "attribute_name": "on_off",
            "value": 1
        }
    },
    "origin": "LOCAL",
    "time_fired": "2020-05-27T19:33:57.256923+00:00",
    "context": {
        "id": "08a6e439603842cca1b598e50f47c967",
        "parent_id": null,
        "user_id": null
    }
}

probably it is only a state change, try checking these.
I have the same with the vibration sensor which doesn’t do an event only state

nope, state of the sensors are ‘unkown’

Anybody figured this out? Having some trouble getting it to work, tried using args_template: "{{ event.trigger.data.args.click_type == 'single' }}"
But this does not work.

After a few tries, I figured it out. Writing all the steps here in case somebody is new to this.

  1. In your HA, go to developer tools > events (/developer-tools/event) and start listening to zha_event.

  2. In the Aqara switch press the button once. The response will be something like:

    {
        "event_type": "zha_event",
        "data": {
            "device_ieee": "00:11:22:33:44:55:66:77",
            "unique_id": "00:33:44:45:62:6a:e4:d1:1:0x0012",
            "endpoint_id": 1,
            "cluster_id": 18,
            "command": "single",
            "args": {
                "value": 1
            }
        },
        "origin": "LOCAL",
        "time_fired": "2020-06-29T07:53:39.352842+00:00",
        "context": {
            "id": "2a7f8a62bc1041139fdf8a6d287e7fdd",
            "parent_id": null,
            "user_id": null
        }
    }
    

    You need the things listed under data.

  3. In the Automations UI, add a new automation:

    1. Add a new trigger

    2. Select “Event” from the dropdown

    3. set zha_event as the event type

    4. In the event data you want the unique stuff that’s under data in the previous step, but converted into YAML.

      For single click, it should be:

      device_ieee: '00:11:22:33:44:55:66:77'
      unique_id: '00:33:44:45:62:6a:e4:d1:1:0x0012'
      command: single
      args:
        value: 1
      

      For double click, it should be:

      device_ieee: '00:11:22:33:44:55:66:77'
      unique_id: '00:33:44:45:62:6a:e4:d1:1:0x0012'
      command: double
      args:
        value: 2
      

      For shake, it should be:

      device_ieee: '00:11:22:33:44:55:66:77'
      unique_id: '00:33:44:45:62:6a:e4:d1:1:0x0012'
      command: shake
      args:
        value: 18
      

In the end, the entry in automations.yaml should look like:

- id: ikealight
  alias: IKEA light toggle
  trigger:
  - event_data:
      device_ieee: 00:11:22:33:44:55:66:77
      unique_id: 00:33:44:45:62:6a:e4:d1:1:0x0012
      command: single
      args:
        value: 1
    event_type: zha_event
    platform: event
  action:
  - entity_id: light.ikea
    service: light.toggle
16 Likes

Hi, did you figure it out how to make this work??
Thanks in advance

This worked for me:

- alias: Corredor con Xiaomi Switch apagado
  trigger:
  - event_data:
      args:
        click_type: double
      command: click
      device_ieee: 00:15:8d:01:03:6c:a2:5f
    event_type: zha_event
    platform: event
  action:
  - scene: scene.corredor_apagado
  mode: single

you are life saver, spent hours googling solution, you are LEGEND

1 Like

Thank you, it works perfectly !!!

How would you do this when your device isn’t providing Any args?

{
    "event_type": "zha_event",
    "data": {
        "device_ieee": "08:6b:d7:ff:fe:fc:a5:b4",
        "unique_id": "08:6b:d7:ff:fe:fc:a5:b4:1:0x0006",
        "device_id": "38ac4e8b414ca8d7c1587da4180cf0eb",
        "endpoint_id": 1,
        "cluster_id": 6,
        "command": "off",
        "args": []
    },
    "origin": "LOCAL",
    "time_fired": "2021-07-14T20:58:40.113693+00:00",
    "context": {
        "id": "5ee402a9847e93706088b7f5a612833d",
        "parent_id": null,
        "user_id": null
    }
}

Never mind I finally got it to work :sweat_smile::sweat_smile:

alias: Button 2
description: 'Sean’s Bedroom Lights '
trigger:
  - platform: event
    event_type: zha_event
    event_data:
      device_ieee: 08:6b:d7:ff:fe:fc:a4:00
      unique_id: 08:6b:d7:ff:fe:fc:a4:00:1:0x0006
      device_id: 9513d1cd5ff8d8fe48fcfcbbf26754e0
      endpoint_id: 1
      cluster_id: 6
      command: 'on'
      args: []
  - platform: event
    event_type: zha_event
    event_data:
      device_ieee: 08:6b:d7:ff:fe:fc:a4:00
      unique_id: 08:6b:d7:ff:fe:fc:a4:00:1:0x0006
      device_id: 9513d1cd5ff8d8fe48fcfcbbf26754e0
      endpoint_id: 1
      cluster_id: 6
      command: 'off'
      args: []
condition: []
action:
  - service: light.toggle
    target:
      area_id: my_bedroom
mode: single
2 Likes

Thank you! That saved my automations as after some time HA was not translating commands but ZAH still was receiving all. I do not have to reset HA each day to have working remotes.

Not sure if anyone can help but I was able to follow this for half od the buttons on the device then got stuck. with the “dim” buttons.

Any help on these would be appreciated

“data”: {
“device_ieee”: “60:a4:23:ff:fe:fd:db:68”,
“unique_id”: “60:a4:23:ff:fe:fd:db:68:1:0x0008”,
“device_id”: “7dc23c493fd7cdef71c343e8f2c4585c”,
“endpoint_id”: 1,
“cluster_id”: 8,
“command”: “step”,
“args”: [
0,
51,
10
],
“params”: {
“step_mode”: 0,
“step_size”: 51,
“transition_time”: 10,
“options_mask”: null,
“options_override”: null
}
},

Trying to trigger an automation when the button is clicked. Seems to get stuck around the arguments.
Thanks

FYI, see this related development discussion on exposing attributes configuration via ZHA GUI:

https://github.com/zigpy/zigpy/discussions/934

I created a user name and password, just to “heart” you and thank you as I had struggled as a new user for some time and this helped me get it working.

I bought a Sonoff Battery switch.
SNZB-01 as one of my first devices on Home Assistant and let’s just say, it was a warm welcome (sarcasm) to Home Assistant and ZigBee!

THANK YOU

But it makes the success and victory so much sweeter after the hard work!