Using Event "args" as datapoints in automation

Hello everyone!
I am trying to use “arg” data from the following event (lutron Aurora through ZHA) to set the brightness of a light. I’m having trouble creating a template or automation which grabs the “arg” data (the number ‘88’ in the example below).

Event in question:

{
    "event_type": "zha_event",
    "data": {
        "device_ieee": "ff:ff:00:0f:e7:fc:bd:9c",
        "unique_id": "ff:ff:00:0f:e7:fc:bd:9c:1:0x0008",
        "endpoint_id": 1,
        "cluster_id": 8,
        "command": "move_to_level_with_on_off",
        "args": [
            88,
            2
        ]
    },
    "origin": "LOCAL",
    "time_fired": "2020-10-26T19:08:09.887640+00:00",
    "context": {
        "id": "965da55517be11ebbf3345c0e704a9e9",
        "parent_id": null,
        "user_id": null
    }
}

Can anyone point me in the right direction? I’ve gotten a bit lost trying to understand templating!

Ive gotten this far on my automation “action”:

type: turn_on
device_id: a1602078fd0b11eaa94c9fe8e98b7b88
entity_id: light.office_dimmer
domain: light
brightness: >

I’m not too sure but maybe something like this?

brightness: "{{ trigger.event.data['args'][0] }}"

1 Like

Is 88 a percentage or the brightness value (0-255).

If it’s a percentage you need to change brightness to brightness_pct.

Andy’s example should work.