Allow using a list in blueprint selectors

It would be helpful to allow using a list in the selectors, when creating blueprints. For example, when using the device selector with model filter, there are often occasions when several models of a device should be able to share a blueprint. For instance, if the model name is changed to indicate a region, however the device is otherwise the same.


Another example, is the Aeotec NanoMote Quad, WallMote Quad and MiniMote - From a standpoint of creating a blueprint for ozw.scene_activated events, all 3 remotes work exactly the same.

Partial example showing showing compatible models

blueprint:
  name: Aeotec Quad Remotes
  description:
  domain: automation
  input:
    aeotec_nanomote:
      name: Aeotec Quad Remotes
      description:
      selector:
          device:
            integration: ozw
            manufacturer: Aeotec Limited
            model:
              - ZWA003 NanoMote Quad
              - ZW130 WallMote Quad
              - DSA03202 Minimote

Another example for inovelli switches and dimmer - There are actually four models that could be combined to a single blueprint, if they were to allow a list in the selector

Partial example showing showing compatible models

blueprint:
  name: Inovelli
  description: Create automations for the Inovelli switches and dimmers using the OZW integration. 
  domain: automation
  input:
    inovelli_switch:
      name: Inovelli
      description: "List of available inovelli Switches and Dimmers
      This list is only a reference. At this time, it is not possible
      to obtain the node's id using the device selector."
      selector:
          device:
            integration: ozw
            manufacturer: Inovelli
            model:
              - LZW30-SN Switch Red Series
              - LZW31-SN Dimmer Red Series
              - NZW30 Smart Switch (w/Scene)
              - NZW31 Smart Dimmer (w/Scene)

At this time, trying to include multiple models in a blueprint will result in the following error.

Invalid blueprint: expected str for dictionary value @ data['blueprint']['input']['inovelli_switch']['selector']['model']. Got None

Seconded. My use case for this is that I want binary_sensors of device_class door, window, and cover to be allowed in the selector.

2 Likes

Seconds this but slightly different (maybe as an intermediate step): Allow multiple selectors per input.

input:
  name: Name
  selector:
    - entity:
        domain: input_boolean
    - entity:
        domain: binary_sensor

That’s exactly my use case, I need something that can be on or off, regardless of being a binary sensor or a (computed) input_boolean.

1 Like

I would definitely appreciate this feature request getting added.

1 Like

If we could use lists, we could just have a list of domains :wink:

Fourth! My use case is the same as @trankillity, I’d like to set up a blueprint which can choose a binary_sensor from a variety of device_classes (for me, it’s door and motion).

1 Like

FYI, I am in the process of testing, but it seems like documentation indicates this is possible: