File tree Expand file tree Collapse file tree 1 file changed +16
-2
lines changed Expand file tree Collapse file tree 1 file changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -52,6 +52,7 @@ The following selectors are currently available:
52
52
- [ Theme selector] ( #theme-selector )
53
53
- [ Time selector] ( #time-selector )
54
54
- [ Trigger selector] ( #trigger-selector )
55
+ - [ Example - Merging with existing triggers] ( #example---merging-with-existing-triggers )
55
56
56
57
Interactive demos of each of these selectors can be found on the
57
58
[ Home Assistant Design portal] ( https://design.home-assistant.io/#components/ha-selector ) .
@@ -1029,17 +1030,30 @@ You are prompted to select the device used to play media. Once the device is sel
1029
1030
1030
1031

1031
1032
1033
+ To ask the user to select a media device and suitable media, you can use the
1034
+ media selector without any options :
1035
+
1032
1036
` ` ` yaml
1033
1037
media:
1034
1038
` ` `
1035
1039
1040
+ You can also use the media selector with an optional `accept` filter to limit the
1041
+ media types that can be selected. The user will not be asked to pick a device.
1042
+
1036
1043
` ` ` yaml
1037
- # Do not ask for a device but manually specify a filter for the media.
1038
1044
media:
1039
1045
accept:
1040
1046
- image/*
1041
1047
` ` `
1042
1048
1049
+ {% configuration area %}
1050
+ accept :
1051
+ description : >
1052
+ List of media types the user is allowed to select.
1053
+ type : list
1054
+ required : false
1055
+ {% endconfiguration %}
1056
+
1043
1057
The output of the media selector, is an mapping with information about
1044
1058
the selected media device and the selected media to play. There is also
1045
1059
metadata, which is used by the frontend and should not be used in the
@@ -1181,7 +1195,7 @@ object:
1181
1195
fields:
1182
1196
name:
1183
1197
label: Name
1184
- selector:
1198
+ selector:
1185
1199
text:
1186
1200
percentage:
1187
1201
label: Percentage
You can’t perform that action at this time.
0 commit comments