good morning,
in automations I have this code that controls the opening of two shutters every day according to certain conditions.
The commands from the cards of the two covers work
Can you tell me why one, the first, opens and the second doesn’t?
The automations are perfectly equal, only the shutter changes.
Thanks, Alberto
- alias: Apertura tapparelle giorni festivi in base al periodo scolastico off cucina
trigger:
- platform: template
value_template: "{{ states('sensor.time') == (state_attr('input_datetime.opshutfestivi', 'timestamp') | int | timestamp_custom('%H:%M', False)) }}"
condition:
- condition: and
conditions:
- condition: time
weekday:
- mon
- tue
- wed
- thu
- fri
- sat
- sun
- condition: state
entity_id: input_boolean.periodo_scolastico
state: 'off'
- condition: state
entity_id: input_boolean.blocco_cucina
state: 'off'
action:
- service: cover.set_cover_position
data_template:
entity_id: cover.tapparella_cucina
position: "100"
- alias: Apertura tapparelle giorni festivi in base al periodo scolastico off sala
trigger:
- platform: template
value_template: "{{ states('sensor.time') == (state_attr('input_datetime.opshutfestivi', 'timestamp') | int | timestamp_custom('%H:%M', False)) }}"
condition:
- condition: and
conditions:
- condition: time
weekday:
- mon
- tue
- wed
- thu
- fri
- sat
- sun
- condition: state
entity_id: input_boolean.periodo_scolastico
state: 'off'
- condition: state
entity_id: input_boolean.blocco_sala
state: 'off'
action:
- service: cover.set_cover_position
data_template:
entity_id: cover.tapparella_sala
position: "100"