From e39aa8dc7339b13579858072386d245ccfee3c3f Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Tue, 24 Jun 2025 15:03:44 -0400 Subject: [PATCH] Add config block to media selector (#39696) Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --- source/_docs/blueprint/selectors.markdown | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/source/_docs/blueprint/selectors.markdown b/source/_docs/blueprint/selectors.markdown index 345d9f4c456..ad8de8d8884 100644 --- a/source/_docs/blueprint/selectors.markdown +++ b/source/_docs/blueprint/selectors.markdown @@ -1029,17 +1029,30 @@ You are prompted to select the device used to play media. Once the device is sel ![Screenshot of the Media selector](/images/blueprints/selector-media.png) +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