Automation not fired

I programmed the following automation but it’s not firing.

- id: living_pendel_toggle
  alias: Living Pendel toggle
  description: ''
  - platform: event
    event_type: knx_event
  - condition: template
    value_template: >
      {{ == "0/0/204" and[0] == 0 }}
  - type: toggle
    device_id: c0365d0acd8a424626c04c524f94ae55
    entity_id: light.grote_lamp
    domain: light
  mode: single

This is the event being registered.

    "event_type": "knx_event",
    "data": {
        "data": 0,
        "destination": "0/0/204",
        "direction": "Incoming",
        "source": "1.1.5",
        "telegramtype": "GroupValueWrite"
    "origin": "LOCAL",
    "time_fired": "2021-09-16T09:03:46.746738+00:00",
    "context": {
        "id": "6a1671007e26f38fa1cda32aee31f030",
        "parent_id": null,
        "user_id": null

Can somebody tell me what I’m doing wrong?

I can’t see the reason for the [0]

1 Like

Because another automation I made a month ago only worked with the [0], but removing it now helped. Thank you.

Just for clarification on why it needs to be different in your automations:

DPT 1,2,3 telegrams have their payload stored directly in data.
All others return a list of int representing the raw bytes - so eg. a DPT 5 payload has a data value of [255] (or [0xff]) since it is only one byte long.
This roughly resembles how the payload is encoded in a CEMI frame.

1 Like

Thanks, that’s very useful for in the future.