Zha_event documentation for IKEA Traadfri wireless dimmer

where does one locate the info/doc/code or anything on what the various zha_event fired data mean when using ikea traadfri wireless dimmer (the round one) ?

I can see endpoint_id: 1, cluster_id: 8 and various commands and some args - some I can guess but others is just mysterious :wink:

any good way to find where/how to map these to something useful ?

Press each button short and long then you’ll see the different events and their meaning.

it is not that easy - it is quite sensitive so just a tiny movement i get 4-10 events.

remember on this device it is a turnable/twistable button so there isn’t really just a single press.

It takes some Sherlock Holmes work…
This example captures the events for a Aqara Cube. Steps: capture, decode, plan what you want to do and then create automations that triggered by the events you want.

Get the ZHA Device Handlers quirks, aka what the device does:

For this Aqara Cube example:

To get the events a little easier, go outside HA with hass-cli

Automation event triggers:

hass-cli event watch zha_event | tee cube.txt

grep -i "00:15:8d:00:02:a3:dd:aa" -B 2 -A 15 < cube.txt

data:
    device_ieee: 00:15:8d:00:02:a3:ca:aa
    unique_id: 00:15:8d:00:02:a3:ca:aa:2:0x0012
    device_id: f660b35dcfd0aeefe0be987aa2b21ec0
    endpoint_id: 2
    cluster_id: 18
    command: flip
    args:
        value: 92.0
        flip_degrees: 90
        activated_face: 5.0
origin: LOCAL
time_fired: '2021-01-05T01:02:02.541345+00:00'
--
--
data:
    device_ieee: 00:15:8d:00:02:a3:ca:aa
    unique_id: 00:15:8d:00:02:a3:ca:aa:2:0x0012
    device_id: f660b35dcfd0aeefe0be987aa2b21ec0
    endpoint_id: 2
    cluster_id: 18
    command: flip
    args:
        value: 98.0
        flip_degrees: 90
        activated_face: 3.0
origin: LOCAL
time_fired: '2021-01-05T01:02:03.360987+00:00'
--
--
data:
    device_ieee: 00:15:8d:00:02:a3:ca:aa
    unique_id: 00:15:8d:00:02:a3:ca:aa:2:0x0012
    device_id: f660b35dcfd0aeefe0be987aa2b21ec0
    endpoint_id: 2
    cluster_id: 18
    command: flip
    args:
        value: 131.0
        flip_degrees: 180
        activated_face: 4.0
origin: LOCAL
time_fired: '2021-01-05T01:02:08.665805+00:00'
--
--

Awesome - with your tips I found https://github.com/zigpy/zha-device-handlers/blob/61dedab318a8986b2b0a7bffe5116bbc40bed214/zhaquirks/ikea/dimmer.py and now the events makes more sense!

And yes, used hass-cli to even get this far before posting; I wrote hass-cli to be able to do things like event watchs and i’m happy to see it still works and are useful today :wink:

thanks again - really useful!

so one thing I can’t find in the python code is what the difference is between:

command: move

and

command: move_ with_on_off

and why I sometimes get:

 args:
   - 0
   - 70

even though that combination does not seem listed in dimmer.py…

Thanks for your work creating hass-cli !!! A useful tool.
If you every have a chance to revisit it as the HA team get these groups, areas, entities and devices ideas figured out, it would be great if hass-cli could expose and query ENTITIES on groups and areas!

On the Ikea remote, it is a wild west with these many new zigbee and bluetooth devices that do not fit into the ‘standard’ services templates that the creators came up with. A light switch they pretty much ave ‘nailed’ but a spinning cube or disc controller. Not sure they saw those coming.

I note at the zigbee2mqtt device handler :

https://www.zigbee2mqtt.io/devices/E1744.html

they have some hacks to handle the rapid fire messages of this device.
Reviewing device handlers at several of the open Zigbee home automations sites often yields a fuller view of a devices capabilities and quirks . Good hunting and Happy New Year!

you mean when filtering on entites/state be able to say hass-cli state list --area kitchen and just have results from entities that are in the kitchen area ?
or something else ?

Well, this seems to be evolving. However, it seems like I can add an entity to both a group and an area (maybe more than once of both?). So if these are ‘attributes’ of an entity, then yes, I would hope to be able to use hass-cli to find all entities that are ‘lights’ (a group) and that are in the ‘kitchen’ (an area).

Entities are singular in an area but can be in multiple groups afaik.