Label-Based Scene Select

This blueprint will help you create a select entities that are automatically populated with all the scene entities that have the selected Labels. Selecting a value from the entity’s options through dashboard or script action will activate that scene.

Features:

  • Multiple Labels can be used.

Open your Home Assistant instance and show the blueprint import dialog with a specific blueprint pre-filled.


blueprint:
  author: Didgeridrew
  homeassistant:
    min_version: 2025.7.0
  name: Label-Based Scene Select
  description: |
    Creates a Select entity that is automatically populated with all the 
    scene entities that have the selected Labels. Selecting a value from the
    entity's options will turn that scene on.
  domain: template
  input:
    labels:
      description: 'The Labels you want this select entity to be based on'
      selector:
        label:
          multiple: true
variables:
  labels: !input labels
select:
  state: |
    {%- set labels = [labels] if labels is not list else labels %}
    {%- set ent = (labels|map('label_entities')|flatten|select('match', 'scene.')
    |sort(attribute='state', reverse=true)|list|first)|default('nope',1) %}
    {{- state_attr(ent, 'friendly_name') | default('No Scene Selected', 1)}}
  optimistic: true
  options: |
    {%- set labels = [labels] if labels is not list else labels %}
    {%- set ents = labels|map('label_entities')|flatten|select('match', 'scene.')|list %}
    {{- ['No Scene Selected'] + expand(ents)|map(attribute='name')|list|sort }}
  select_option:
    - condition: template
      value_template: "{{ option != 'No Scene Selected' }}"
    - service: scene.turn_on
      target:
        entity_id: |
          {{ states.scene | selectattr('name', 'eq', option) | map(attribute='entity_id') | first }}
1 Like

Template Blueprints are currently (July 2025) only available through YAML configuration. You can find more details about how to use them at:

HA Docs - Templates - Using Blueprints

Once you have installed the blueprint, use the following examples to help set up your own Selects in your configuration files.


Configuration Examples:

template:
  - name: Favorite Scenes Selector
    unique_id: favorite_scenes_0001
    use_blueprint: 
      path: Didgeridrew/label-based-scene-select.yaml
      input:
        labels: favorite_scenes 

  • This Post has been set to Wiki Mode. Please feel free edit this post to add configuration examples if you think they are needed