I wrote an automation (script) to control two shutters by a knx group adress signal
if rolladen_straße.close() command is set (from knx or homassistant ui)
rolladen_straße_T.close() (first shutter) shout be executed, then after 1s
rolladen_straße_N.close() (second shutter should be executed
the script itself works, but not the “trigger”
this is the script:
id: '1642348490881'
alias: Rolladen Straße (close)
description: ''
trigger:
- platform: state
entity_id: cover.rolladen_strasse
to: close
condition: []
action:
- service: cover.close_cover
target:
entity_id: cover.rolladen_strasse_t
- delay:
hours: 0
minutes: 0
seconds: 1
milliseconds: 0
- service: cover.close_cover
target:
entity_id: cover.rolladen_strasse_n
mode: single
- id: '1642348599922'
You need to make sure you get the state exactly correct. Look in developer tools / states. You should also quote your states so that they are interpreted as strings not boolean values (off is not the same as 'off')
trigger:
- platform: state
entity_id: cover.rolladen_strasse
to: 'closed'
Note that this trigger won’t occur until your first shutter has closed completely.
If you want to trigger when the ‘close’ command is sent to the first shutter you probably need an event trigger, not a state trigger. I have no idea what this event is. Probably something along these lines: Using events to trigger actions - #12 by Wouter1
That would probably be the correct event, but the key names have changed slightly since that post (eg. address is destination now). See KNX - Home Assistant