Area-Based Scene Select

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

Features:

  • Both Area IDs and Area Names are supported as input
  • Multiple Areas can be used in a single select.

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


Change Log:

2026-01-25: Updated the template for the targeted scene entity ID. This should solve an issue where a seemingly random scene is targeted if you have multiple scenes in your instance with the exact same name. However, the issue will still occur if your Select is set to cover multiple Areas and same-named entities exist in more than one of those Areas.

blueprint:
  author: Didgeridrew
  homeassistant:
    min_version: 2025.7.0
  name: Area-Based Scene Select
  description: |
    Creates a Select entity that is automatically populated with all the 
    scene entities from the selected Areas. Selecting a value from the
    entity's options will turn that scene on.
  domain: template
  input:
    areas:
      name: Areas
      description: 'The Area(s) you want to select Scenes from'
      selector:
        area:
          multiple: true
          entity:
            domain: scene
variables:
  area_ids: !input areas
select:
  state: |
    {% set area_ids = [area_ids] if area_ids is not list else area_ids %}
    {% set ent = (area_ids|map('area_entities')|flatten|select('match', 'scene.')
    |sort(attribute='state', reverse=true)|list|first) %}
    {{ state_attr(ent, 'friendly_name') | default('No Scene Selected', 1)}}
  optimistic: true
  options: |
    {% set area_ids = [area_ids] if area_ids is not list else area_ids %}
    {% set ents = area_ids|map('area_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: |
          {%- set area_ids = [area_ids] if area_ids is not list else area_ids %}
          {%- set ents = area_ids|map('area_entities')|flatten|select('match', 'scene.')|list %}
          {{ ents | expand | selectattr('name', 'eq', option) | map(attribute='entity_id') | first }}
2 Likes

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: Living Room and Basement Scene Selector
    unique_id: lr_basement_scenes_0001
    use_blueprint: 
      path: Didgeridrew/area-based-scene-select.yaml
      input:
        areas: 
          - 0352e80e71464487b396c5559c886de0
          - Basement

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

This is brilliant, thank you. I used to do this manually with template selects and it was so much hassle.

Thank you so much for this !
I am trying to import it to my instance but I’m getting “Unsupported domain” error. Does it make any sense to you ?
I tried copy-pasting the actual code into a yaml file in the blueprints folder but I must not be doing it right.

Did the “Import Blueprint to MyHome” button in the first post not work?

Where are you seeing the “Unsupported domain” error? If this error is showing up in an editor like Visual Studio Code you can ignore it, the syntax extension it is using is quite a bit behind and the errors it produces are false positives more often then not.

The button itself does what it’s supposed to do i.e. prefill the popup but then I get

NB: I am able to import using that same popup when it’s from github…

I don’t really know what to tell you, I just tried it and it worked as expected…

Why isn’t the blueprint address shown in your screenshot?

What HA release are you running?

If you can’t get the MyHome link to work properly, you should be able to add it manually. I’m not completely sure if it’s required, but I think you’ll need to make sure that you use the expected directory structure:

config/blueprints/template/Didgeridrew/area-based-scene-select.yaml

Don’t forget to restart HA after adding it.

Perhaps they don’t have default_config: loaded and the template integration is not there?
Not sure I’ve seen that, but it might be possible…

Thanks for checking.
Yes the blueprint address shows at first but then when I click ‘Preview’ I get the screenshot I shared above. Running latest version of everything.

Will try again manually with proper directory structure.

Thanks for your input - How would I verify this potential issue ?

Look at your configuration.yaml and see if the default_config: line is in there or if you have removed it. Look in the HA Docs to see what that does.

Allright so I think I put it all in the right places.
I put

  • your blueprint in config/blueprints/template/didgeridrew/area-based-scene-select.yaml
  • my template in config/blueprints/template/myname/scene_selector.yaml

The content of my template is

template:
  - name: Bedroom Scene Selector
    unique_id: bedroom_scenes_0001
    use_blueprint:
      path: didgeridrew/area-based-scene-select.yaml
      input:
        areas:
          - Bedroom

I am still confused where I’m supposed to be able to find this selector and use it.
I tried to filter my entity list on Select type but it does not show here.
Went through the documentation for blueprints but couldn’t figure out what applied to my issue.

Sorry for the drag here ! Would appreciate if you could point me in the right direction if this is something obvious to you and/or the right bit of documentation.

The configuration for the template entity should be placed either directly in configuration.yaml or a file properly split and merged to use the template integration, not in the “blueprints” directory.

FWIW, my preferred config split method is Packages. I think it offers the most flexibility and ease of use since it allows using multiple top-level integration keys in the same file and follows the same syntax used in configuration.yaml (which is what most example will be provided as).

Once that has been moved to an appropriate place you should restart HA so that the new configuration gets loaded.