Good morning,
how can I link these two automations into a single trigger?
If I leave them separated, only the first automation starts!
Why ?
It is possible to join them, the only thing that changes is the block that is set manually to one or both of the shutters.
I tried to put the second condition after the first action but it doesn’t work.
Thanks, Alberto
- alias: Chiusura parziale tapparella cucina
trigger:
- platform: template
value_template: "{{ states('sensor.time') == (state_attr('input_datetime.clshutestiva', 'timestamp') | int | timestamp_custom('%H:%M', False)) }}"
condition:
condition: and
conditions:
- condition: state
entity_id: 'sensor.season'
state: 'summer'
- condition: state
entity_id: input_boolean.blocco_cucina
state: 'off'
action:
- service: cover.set_cover_position
data_template:
entity_id: cover.tapparella_cucina
position: "30"
- alias: Chiusura parziale tapparella sala
trigger:
- platform: template
value_template: "{{ states('sensor.time') == (state_attr('input_datetime.clshutestiva', 'timestamp') | int | timestamp_custom('%H:%M', False)) }}"
condition:
condition: and
conditions:
- condition: state
entity_id: 'sensor.season'
state: 'summer'
- condition: state
entity_id: input_boolean.blocco_sala
state: 'off'
action:
- service: cover.set_cover_position
data_template:
entity_id: cover.tapparella_sala
position: "30"