3 actions on trigger with 3 diferent conditions

I’m 3 diferente trigers thar run in diferente times. I want to put them all in one time only ( 20:00:00 ) but i can’t understand how can i do that. Can anyone help me please

This is my code…

#########################################################
#                                                       #
#      ALERTAR PARA ESTADO JANELA CASA                  #
#                                                       #
#########################################################
- id: '9_001_13'
  alias: 'Telegram - Janela Ricardo Não Fechou'
  trigger:
  - at: '20:05:00'
    platform: time
  condition:
    condition: and
    conditions:
      - condition: state
        entity_id: group.janela_ricardo
        state: 'open'
  action:
  - data:
      message: Estore da Janela Ricardo está aberta.
    service: notify.ha_telegram

- id: '9_001_14'
  alias: 'Telegram - Janela Princesas Não Fechou'
  trigger:
  - at: '20:06:00'
    platform: time
  condition:
    condition: and
    conditions:
      - condition: state
        entity_id: group.janela_princesas
        state: 'open'
  action:
  - data:
      message: Estore da Janela Princesas está aberta.
    service: notify.ha_telegram

- id: '9_001_15'
  alias: 'Telegram - Janela Sala Não Fechou'
  trigger:
  - at: '20:07:00'
    platform: time
  condition:
    condition: and
    conditions:
      - condition: state
        entity_id: group.janela_sala
        state: 'open'
  action:
  - data:
      message: Estore da Janela Sala está aberta.
    service: notify.ha_telegram

so I get this right, at 20:00 you want to check if some windows are open right?
if so, this is how I’ve done this.
Create a group called door_and_window_sensors that contains all the windows to monitor and then add this automation

- alias: 'Windows left open alert'
  initial_state: true
  trigger:
    - at: '20:00:00'
      platform: time
  condition:
    - condition: state
      entity_id: group.door_and_window_sensors
      state: 'on'
  action:
    - service: notify.ios_lolos_iphone
      data_template:
        message: |
          The {% for windoor in state_attr("group.door_and_window_sensors","entity_id")|list  -%}
          {% if is_state(windoor,"on") %}{{state_attr(windoor, "friendly_name")}}, {% endif %}
          {%- endfor -%} are not closed.
1 Like

Thanks. I make some alterations in your code, but it work. Many many Thanks.
Regards. Ricardo Carmo
This is my final code:

- id: '9_001_50' 
  alias: 'Windows left open alert'
  initial_state: true
  trigger:
    - at: '20:00:00'
      platform: time
  condition:
    - condition: state
      entity_id: group.all_covers
      state: 'open'
  action:
    - service: notify.ha_telegram
      data_template:
        message: |
          The {% for windoor in state_attr("group.all_covers","entity_id")|list  -%}
          {% if is_state(windoor,"open") %}{{state_attr(windoor, "friendly_name")}}, {% endif %}
          {%- endfor -%} are not closed.
1 Like