Document new accept keyword for the media selector (#39692)

Co-authored-by: c0ffeeca7 <38767475+c0ffeeca7@users.noreply.github.com>
This commit is contained in:
Paulus Schoutsen 2025-06-24 11:36:34 -04:00 committed by GitHub
parent 29272d9cc0
commit d8d5c98836
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -155,7 +155,7 @@ device:
When set, the list of areas is limited to areas with devices that have When set, the list of areas is limited to areas with devices that have
the set model ID. the set model ID.
type: string type: string
required: false required: false
entity: entity:
description: > description: >
When entity options are provided, the list of areas is filtered by areas When entity options are provided, the list of areas is filtered by areas
@ -571,7 +571,7 @@ filter:
description: > description: >
When set, the list of devices is limited to devices that have the set model ID. When set, the list of devices is limited to devices that have the set model ID.
type: string type: string
required: false required: false
multiple: multiple:
description: > description: >
Allows selecting multiple devices. If set to `true`, the resulting value of Allows selecting multiple devices. If set to `true`, the resulting value of
@ -608,7 +608,7 @@ device:
filter: filter:
- integration: deconz - integration: deconz
manufacturer: Philips manufacturer: Philips
model: RWL021 model: RWL021
entity: entity:
- domain: sensor - domain: sensor
device_class: battery device_class: battery
@ -635,7 +635,7 @@ enable_millisecond:
description: When `true`, the duration selector will allow selecting milliseconds. description: When `true`, the duration selector will allow selecting milliseconds.
type: boolean type: boolean
default: false default: false
required: false required: false
{% endconfiguration %} {% endconfiguration %}
The output of this selector is a mapping of the time values the user selected. The output of this selector is a mapping of the time values the user selected.
@ -757,7 +757,7 @@ entity:
## Floor selector ## Floor selector
The floor selector shows a floor finder that can pick The floor selector shows a floor finder that can pick
floors based on the selector configuration. The value of the input will be the floors based on the selector configuration. The value of the input will be the
floor ID. If `multiple` is set to `true`, the value is a list of floor IDs. floor ID. If `multiple` is set to `true`, the value is a list of floor IDs.
@ -808,7 +808,7 @@ device:
When set, the list only includes floors with devices that have When set, the list only includes floors with devices that have
the set model ID. the set model ID.
type: string type: string
required: false required: false
entity: entity:
description: > description: >
When entity options are provided, the list only includes floors When entity options are provided, the list only includes floors
@ -1025,8 +1025,7 @@ The media selector is a powerful selector that allows a user to easily select
media to play on a media device. Media can be a lot of things, for example, media to play on a media device. Media can be a lot of things, for example,
cameras, local media, text-to-speech, Home Assistant Dashboards, and many more. cameras, local media, text-to-speech, Home Assistant Dashboards, and many more.
The user selects the device to play media on, and automatically limits the You are prompted to select the device used to play media. Once the device is selected, the media selector only shows media that is suitable for this device.
selectable media suitable for the selected device.
![Screenshot of the Media selector](/images/blueprints/selector-media.png) ![Screenshot of the Media selector](/images/blueprints/selector-media.png)
@ -1034,6 +1033,13 @@ selectable media suitable for the selected device.
media: media:
``` ```
```yaml
# Do not ask for a device but manually specify a filter for the media.
media:
accept:
- image/*
```
The output of the media selector, is an mapping with information about The output of the media selector, is an mapping with information about
the selected media device and the selected media to play. There is also the selected media device and the selected media to play. There is also
metadata, which is used by the frontend and should not be used in the metadata, which is used by the frontend and should not be used in the
@ -1059,6 +1065,25 @@ metadata:
media-source://tts/cloud?message=TTS+Message&language=en-US&gender=female media-source://tts/cloud?message=TTS+Message&language=en-US&gender=female
``` ```
Example output if accept filter is used. Note that the `entity_id` is not present:
```yaml
media_content_id: media-source://tts/cloud?message=TTS+Message&language=en-US&gender=female
media_content_type: provider
metadata:
title: TTS Message
thumbnail: https://brands.home-assistant.io/_/cloud/logo.png
media_class: app
children_media_class: null
navigateIds:
- {}
- media_content_type: app
media_content_id: media-source://tts
- media_content_type: provider
media_content_id: >-
media-source://tts/cloud?message=TTS+Message&language=en-US&gender=female
```
## Number selector ## Number selector
The number selector shows either a number input or a slider input, that allows The number selector shows either a number input or a slider input, that allows
@ -1445,7 +1470,7 @@ device:
model_id: model_id:
description: When set, the targets are limited to devices that have the set model ID. description: When set, the targets are limited to devices that have the set model ID.
type: string type: string
required: false required: false
entity: entity:
description: > description: >
When entity options are provided, the targets are limited by entities When entity options are provided, the targets are limited by entities