Quantcast
Channel: Configuration - Home Assistant Community
Viewing all articles
Browse latest Browse all 106317

Wall dimmer event handler

$
0
0

Hi all,
just got some of the Sunricher wall dimmers. Maybe first question: is there any “native” way to assign lights to the buttons and use the dimmer to turn on and dimm lights?
I am trying to use zha_event handler to use the passed event data data to control my lights. The event data I get is similar to:

{
    "event_type": "zha_event",
    "data": {
        "device_ieee": "00:0d:6f:00:13:6a:6e:48",
        "unique_id": "00:0d:6f:00:13:6a:6e:48:1:0x0008",
        "endpoint_id": 1,
        "cluster_id": 8,
        "command": "move_to_level_with_on_off",
        "args": [
            111,
            0
        ]
    },
    "origin": "LOCAL",
    "time_fired": "2020-09-26T22:20:13.714532+00:00",
    "context": {
        "id": "72b59740004611ebb4bc87eb18123991",
        "parent_id": null,
        "user_id": null
    }
}

Now I in my automation I would like use the “args” parameter. So the brightness of the light is dependend on the retrieved value (e.g. 111 in the example above).
What I got so far is:

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

Obviously it is not working (that´s the reason why I write this post). The logs tell me:

voluptuous.error.MultipleInvalid: expected int for dictionary value @ data['brightness']

Any hints are welcome.
Best regards

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 106317

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>