From 41e7b8164a7312fd8e195597f87ac83a3a4823b4 Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Tue, 24 Jun 2025 16:59:06 +0000 Subject: [PATCH 1/2] Add config block to media selector --- 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 345d9f4c4562..a66f7539dd7c 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 area %} +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 From 7b1dea8cd78da56c44b13bf6c53a6542d05a22c0 Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Tue, 24 Jun 2025 13:04:58 -0400 Subject: [PATCH 2/2] Update source/_docs/blueprint/selectors.markdown Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --- source/_docs/blueprint/selectors.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/_docs/blueprint/selectors.markdown b/source/_docs/blueprint/selectors.markdown index a66f7539dd7c..ad8de8d8884c 100644 --- a/source/_docs/blueprint/selectors.markdown +++ b/source/_docs/blueprint/selectors.markdown @@ -1045,7 +1045,7 @@ media: - image/* ``` -{% configuration area %} +{% configuration media %} accept: description: > List of media types the user is allowed to select.