mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-21 16:27:19 +00:00
Add config block to media selector (#39696)
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
This commit is contained in:
parent
c5a0d7c228
commit
e39aa8dc73
@ -1029,17 +1029,30 @@ You are prompted to select the device used to play media. Once the device is sel
|
||||
|
||||

|
||||
|
||||
To ask the user to select a media device and suitable media, you can use the
|
||||
media selector without any options:
|
||||
|
||||
```yaml
|
||||
media:
|
||||
```
|
||||
|
||||
You can also use the media selector with an optional `accept` filter to limit the
|
||||
media types that can be selected. The user will not be asked to pick a device.
|
||||
|
||||
```yaml
|
||||
# Do not ask for a device but manually specify a filter for the media.
|
||||
media:
|
||||
accept:
|
||||
- image/*
|
||||
```
|
||||
|
||||
{% configuration media %}
|
||||
accept:
|
||||
description: >
|
||||
List of media types the user is allowed to select.
|
||||
type: list
|
||||
required: false
|
||||
{% endconfiguration %}
|
||||
|
||||
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
|
||||
metadata, which is used by the frontend and should not be used in the
|
||||
@ -1181,7 +1194,7 @@ object:
|
||||
fields:
|
||||
name:
|
||||
label: Name
|
||||
selector:
|
||||
selector:
|
||||
text:
|
||||
percentage:
|
||||
label: Percentage
|
||||
|
Loading…
x
Reference in New Issue
Block a user