mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-15 13:26:54 +00:00
Document new accept
keyword for the media selector (#39692)
Co-authored-by: c0ffeeca7 <38767475+c0ffeeca7@users.noreply.github.com>
This commit is contained in:
parent
29272d9cc0
commit
d8d5c98836
@ -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,
|
||||
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
|
||||
selectable media suitable for the selected device.
|
||||
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.
|
||||
|
||||

|
||||
|
||||
@ -1034,6 +1033,13 @@ selectable media suitable for the selected device.
|
||||
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 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
|
||||
@ -1059,6 +1065,25 @@ metadata:
|
||||
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
|
||||
|
||||
The number selector shows either a number input or a slider input, that allows
|
||||
|
Loading…
x
Reference in New Issue
Block a user