I want that a double push to any of the KNX push buttons in a house turns off all lights. I have written an automation that works as expected when you double click the KNX button with KNX group address 1/0/9. Is there a way to adapt this code to make it work for several KNX group addresses (1/0/1, 1/0/2,…,1/0/16)?
alias: Doble click apaga todas las luces
description: ""
trigger:
- platform: knx.telegram
destination: 1/0/9
condition: []
action:
- wait_for_trigger:
- platform: knx.telegram
destination: 1/0/9
timeout:
hours: 0
minutes: 0
seconds: 0
milliseconds: 400
continue_on_timeout: true
- if:
- condition: template
value_template: "{{ wait.trigger == none }}"
then: null
else:
- wait_for_trigger:
- platform: knx.telegram
destination: 1/0/9
timeout:
hours: 0
minutes: 0
seconds: 0
milliseconds: 400
continue_on_timeout: true
- if:
- condition: template
value_template: "{{ wait.trigger == none }}"
then:
- service: light.turn_off
target:
entity_id: all
data: {}
else: null