Control non KNX entities from KNX wall button

Hi all!

New here, but have been running HA for a while and integrated KNX with it (to the best of my ability)

I´m trying to get a KNX wall switch to control a non KNX device.

I´ve tried to follow the guide by @farmio to the letter in this video:

but no success so far. Any help would be much appreciated.

this is my automation:

 alias: Control non KNX entities from KNX wall button
description: ""
trigger:
  - platform: device
    domain: knx
    device_id: 44d3cd41696f9e10ddde63e2fff5da54
    type: telegram
    group_value_write: true
    group_value_response: true
    group_value_read: true
    incoming: true
    outgoing: true
    destination:
      - 1/0/9
condition: []
action:
  - choose:
      - conditions:
          - condition: template
            value_template: "{{ trigger.payload == 0 }}"
            enabled: true
        sequence:
          - type: turn_on
            device_id: 8a70b6aab8d8fc96113d9de77fd28a7c
            entity_id: 0a539638c3f3f030b7e1e95dcd13ed81
            domain: switch
            enabled: true
mode: single

Have a look at the automation debugger. Does the trigger fire? Is the condition met?
Or at the group monitor. Is a telegram to that GA received? Is the payload 0 ?

Hi Matthias! Thanks for helping me out!

The automation debugger, you mean the blue bar in the automation that lights up when I press the wall button?

if so, yes it seems to be triggered.

Triggering event detail:

variables:
  trigger:
    id: "0"
    idx: "0"
    alias: null
    destination: 1/0/9
    destination_name: Inglasad Veranda
    direction: Incoming
    dpt_main: 5
    dpt_sub: 1
    dpt_name: percent
    payload:
      - 0
    source: 1.1.17
    source_name: MDT technologies BE-GT04x.01 Glass Push Button 4-fold Plus
    telegramtype: GroupValueWrite
    timestamp: "2024-08-26T20:33:02.574228+03:00"
    unit: "%"
    value: 0
context: null

this is what I see on the group monitor when the button is pressed

edit: I should also add that the automation is triggered no matter what button I press on the wall switch

No, but that’s fine too :rofl:

See the payload:

that’s a list of integers (since it isn’t DPT 1,2,3).
Use
value_template: "{{ trigger.payload[0] == 0 }}"
Or even easier - since you have project data
value_template: "{{ trigger.value == 0 }}"

Wow! Thanks it seems to work now! All I was missing was “[0]”!

now if I want button 1 as condition I use

{{ trigger.payload[0] == 0 }}

and for button 2

{{ trigger.payload[0] == 1 }}

Can´t thank you enough!

Have to play around a little bit with

value_template: "{{ trigger.value == 0 }}

and see if I can figure it out.

Another thing, in your example video you skip the middle section (And if)) and go straight to (Then do) where you put your condition and action. May I ask why? It seems counterintuitive to put the condition together with the action…

Because I wanted to have different actions for different payloads.
When the condition (And If) part isn’t met, the automation wouldn’t be executed further.

Ah, yes that makes sense!!