Multiple values in trigger

i have the following automation and its working:

  • alias: Toggle light
    trigger:
    • platform: event
      event_type: deconz_event
      event_data:
      id: lumisensor_cube
      event: 2001
      action:
    • service: light.toggle
      entity_id: light.ligh1

I like to run this on multiple events like 2001, 2003, 2004, 2005 and 2006 or maybe 200*. Whats the best way to do this ?

You want to run the same automation? If so you can either list multiple triggers or, depending on what events get fired by the device, remove the event_data from the trigger so it fires on all events (and use conditions to prevent firing on the ones you don’t want it to fire on if neccessary). All depends on use case and number of potential outputs from the device to decide which way is quicker/easier/less code.

Yes. Same automation on multiple events.

Bumping it for what purpose? I already answered the question nearly a year ago.

1 Like