From 022c835d2f31a9dbcc7c5a711ca83ecafbd23635 Mon Sep 17 00:00:00 2001 From: Steve Repsher Date: Tue, 15 Nov 2022 14:44:40 -0500 Subject: [PATCH] Add autocomplete and clarify type parameters for text selector (#24715) --- .vscode/cSpell.json | 1 + source/_docs/blueprint/selectors.markdown | 26 +++++++++++++++-------- 2 files changed, 18 insertions(+), 9 deletions(-) diff --git a/.vscode/cSpell.json b/.vscode/cSpell.json index 2b7c59ea742..b5f56bd6f61 100644 --- a/.vscode/cSpell.json +++ b/.vscode/cSpell.json @@ -56,6 +56,7 @@ "Lutron", "macos", "Meteobridge", + "mireds", "Modbus", "Mosquitto", "Multiday", diff --git a/source/_docs/blueprint/selectors.markdown b/source/_docs/blueprint/selectors.markdown index b9d228dd904..b5f75ac2d8d 100644 --- a/source/_docs/blueprint/selectors.markdown +++ b/source/_docs/blueprint/selectors.markdown @@ -216,7 +216,7 @@ area: ## Attribute selector -The attributes selector shows a list of state attribites from a provided entity +The attributes selector shows a list of state attributes from a provided entity of which one can be selected. This allows for selecting, e.g., the "Effect" attribute from a light entity, or the @@ -314,7 +314,7 @@ This selector does not have any other options; therefore, it only has its key. date: ``` -The output of this selector is will contain the date in Year-Month-Day +The output of this selector will contain the date in Year-Month-Day (`YYYY-MM-DD`) format, for example, `2022-02-22`. ## Date & time selector @@ -330,7 +330,7 @@ This selector does not have any other options; therefore, it only has its key. datetime: ``` -The output of this selector is will contain the date in Year-Month-Day +The output of this selector will contain the date in Year-Month-Day (`YYYY-MM-DD`) format and the time in 24-hour format, for example: `2022-02-22 13:30:00`. @@ -619,7 +619,7 @@ radius: 500 # Only provided when radius was set to true. 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 Dashboads, and many more. +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. @@ -1013,11 +1013,19 @@ suffix: required: false type: description: > - The type of input. This is a browser hint, which can improve - the client-side validation of the input. The value isn't validated - by the backend. Possible types are: + The type of input. This supplies the [HTML `type` attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#input_types), + which controls how the browser displays and validates the field. A subset of types available to the attribute are supported, + since some are handled by other selectors. Possible types are: `color`, `date`, `datetime-local`, `email`, `month`, `number`, `password`, `search`, `tel`, `text`, `time`, `url`, `week`. type: string + default: text + required: false +autocomplete: + description: > + Guides the browser on the type of information which should automatically fill the field. + This supplies the [HTML `autocomplete` attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete). + Any value supported by the HTML attribute is valid. + type: string required: false {% endconfiguration %} @@ -1036,7 +1044,7 @@ theme: This selector does not have any other options; therefore, it only has its key. -The output of this selector is will contain the selected theme, for example: +The output of this selector will contain the selected theme, for example: `waves_dark`. ## Time selector @@ -1052,5 +1060,5 @@ This selector does not have any other options; therefore, it only has its key. time: ``` -The output of this selector is will contain the time in 24-hour format, +The output of this selector will contain the time in 24-hour format, for example, `23:59:59`.