home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
72.81k stars 30.51k forks source link

allow lists in blueprint selectors #44545

Closed tprelog closed 3 years ago

tprelog commented 3 years ago

The problem

I think this is more a feature request , rather than a problem

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

Environment

Problem-relevant configuration.yaml

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

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

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

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)

Traceback/Error logs

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

Additional information

frenck commented 3 years ago

Thank you for reaching out. We use GitHub for tracking issues, not for providing support or tracking feature requests.

If you want to suggest a feature, you should try our Community Forum: Feature Requests.

If you have additional questions, feel free to join our Discord chat server.

Thanks! 👍

tprelog commented 3 years ago

In case anybody happens on this in the future...

Please go vote!

https://community.home-assistant.io/t/allow-using-a-list-in-blueprint-selectors/260869