Iām trying to make a blueprint for controlling Somfy curtains from the KNX installation, first i created a simple automation that took the knx_event and controlled the curtains i added via the Overkiz integration. That worked like a charm, but i wanted to create a blueprint (first time ) and followed the steps in the guide here.
Everything is working out and now i want to be able to change the last part of the destination address via the blueprint (i created main group 9 with mid group 0 being open/close, 1 being stop and 2 position, the last group is the cover itself. So 9/0/0 would be open/close bedroom and 9/0/1 would be open/close living room)
My code so far:
blueprint:
name: Gordijnen
domain: automation
input:
gordijn.entity:
name: Gordijn
selector:
entity:
domain: cover
knx.address:
name: KNX address
selector:
text:
trigger:
- platform: event
event_type: knx_event
event_data:
destination: 9/0/0
data: 0
id: Open
- platform: event
event_type: knx_event
event_data:
destination: 9/0/0
data: 1
id: Dicht
- platform: event
event_type: knx_event
event_data:
destination: 9/1/0
id: Stop
- platform: event
event_type: knx_event
event_data:
destination: 9/2/0
id: Percentage
condition: []
action:
- choose:
- conditions:
- condition: trigger
id: Open
sequence:
- service: cover.open_cover
data: {}
target:
entity_id: !input gordijn.entity
- conditions:
- condition: trigger
id: Dicht
sequence:
- service: cover.close_cover
data: {}
target:
entity_id: !input gordijn.entity
- conditions:
- condition: trigger
id: Stop
sequence:
- service: cover.stop_cover
data: {}
target:
entity_id: !input gordijn.entity
- conditions:
- condition: trigger
id: Percentage
sequence:
- service: cover.set_cover_position
data:
position: "{{ trigger.event.data.value }}"
target:
entity_id: !input gordijn.entity
I want to be able to change the last part: destination: 9/0/0
so the 0 at the end would be whatever knx.address
is. Is there a way to append that? or do i need todo something completely different?