Question about my knx automation to turn off xiaomi lights

Question about my knx automation to turn off xiaomi lights

My automation won’t execute, but I do get the command 0/5/4,off in knx, but the xiaomi lights just won’t turn off.

My knx device was added via ui, does it have anything to do with this?

I can’t listen to the 0/5/4 off command in knx_event About my knx automation to turn off xiaomi lights

My automation can’t be executed, but I do get the 0/5/4 off command in knx, but xiaomi’s lights won’t turn off.

My knx device was added via ui, does it have anything to do with this?

I can’t hear the off command from 0/5/4 in knx_event. Question about my knx automation to turn off xiaomi lights

My automation is not working, but I do get the command 0/5/4,off in knx, but the xiaomi lights are not turned off.

My knx device was added via ui, does it have anything to do with this?

I can’t listen to the 0/5/4 off command in knx_event.

Installation
Home Assistant OS
Core
2025.7.1
Supervisor
2025.07.1
Operating System
15.2
Frontend
20250702.1

alias: KNX 离家模式关闭小米灯光
description: 当 KNX 组地址 0/5/4 收到 OFF 指令时,关闭小米的所有灯光和开关
triggers:
  - event_type: knx_event
    event_data:
      address: 0/5/4
      type: "off"
    trigger: event
conditions: []
actions:
  - target:
      entity_id:
        - light.lemesh_cn_1123993758_wy0a20_s_2_light
        - light.mijia_cn_group_1927250626531184640_group3_s_2
        - light.lemesh_cn_1123994229_wy0a20_s_2_light
    action: light.turn_off
    data: {}
  - target:
      entity_id:
        - switch.lemesh_cn_889518281_sw3f13_on_p_3_1
        - switch.lemesh_cn_889518281_sw3f13_on_p_2_1
    action: switch.turn_off
    data: {}
mode: single

“Thank you for your responses—I’m a newbie who’s only just started using HA.”

Hi :wave:!
Don’t use knx_event. Use knx.telegram trigger. You’ll find examples in the KNX integration documentation.

Okay, thank you very much, I will give it a try. Thanks again.

Thank you for your answer. After trying, I have configured the file correctly (preliminarily). Thank you again for your help.

alias: knx button close xiaomi light test 2
description: ""
triggers:
  - trigger: knx.telegram
    destination: 0/5/4
    group_value_read: false
    outgoing: false
conditions:
  - condition: template
    value_template: "{{ trigger.value == 'off' }}"
actions:
  - target:
      entity_id:
        - light.lemesh_cn_1123993758_wy0a20_s_2_light
        - light.mijia_cn_group_1927250626531184640_group3_s_2
        - light.lemesh_cn_1123994229_wy0a20_s_2_light
    action: light.turn_off
    data: {}
  - target:
      entity_id:
        - switch.lemesh_cn_889518281_sw3f13_on_p_3_1
        - switch.lemesh_cn_889518281_sw3f13_on_p_2_1
    action: switch.turn_off
    data: {}