Multiple triggers in automation

Hi,

I have the following automation which works for 1 switch but it doesn’t allow me to enter multiple switches in the trigger (if in the trigger I have only 1 entity, it works fine)

alias: Eteindre en bas
trigger:
  - entity_id: switch.hall_1er_cote_chambre_rue_d
  - entity_id: switch.hall_1er_cote_sdd
    for: '00:00:01'
    from: 'off'
    platform: state
    to: 'on'
condition: []
action:
  - service: light.turn_off
    data:
      entity_id:
        - light.ext_garage_lumiere
        - light.ext_entree_lumiere
        - light.ext_jardin_lumiere
        - light.ext_terrasse_lumiere
        - light.e0_hall_lumiere
        - light.e0_hall_cuisine_lumiere
        - light.e0_toilette_lumiere
        - light.e0_garage_lumiere
        - light.e0_cuisine_lumiere
        - light.e0_SAM_lumiere
        - light.e0_salon_lumiere
mode: single

That’s because your’re using it incorrectly.

Try like this:

trigger:
  - entity_id: 
     - switch.hall_1er_cote_sdd
     - switch.hall_1er_cote_chambre_rue_d
    for: '00:00:01'
    from: 'off'
    platform: state
    to: 'on'
3 Likes

Thanks, that was it :slight_smile:

Glad that you got it to work. Please consider marking my post as the solution so that other people in the future find it quickly and the thread will be marked as solved.