Is it possible to define and use a list of entities?

Consider the following trigger:

  trigger:
    platform: state
    entity_id: sensor.foo, sensor.bar
    to: 'Detected'

It would be great to be able to create a list like:

sensorList = {foo, bar} 

and then use it like:

  trigger:
    platform: state
    entity_id: sensor.hyundaix
    to: 'Detected'

That way if you use these trigger entities in many places you only have to define them once.

1 Like