mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-19 15:26:59 +00:00
Add documentation for QR code selector (#31318)
This commit is contained in:
parent
599b535ca7
commit
19a4776ec7
@ -72,12 +72,12 @@ module Jekyll
|
||||
if attr['type'].kind_of? Array
|
||||
attr['type'].each do |type|
|
||||
raise ArgumentError, "Configuration type '#{type}' for key '#{key}' is not a valid type in the documentation."\
|
||||
" See: https://developers.home-assistant.io/docs/en/documentation_create_page.html#configuration" unless \
|
||||
" See: https://developers.home-assistant.io/docs/documenting/create-page#configuration" unless \
|
||||
TYPES.include? type
|
||||
end
|
||||
else
|
||||
raise ArgumentError, "Configuration type '#{attr['type']}' for key '#{key}' is not a valid type in the documentation."\
|
||||
" See: https://developers.home-assistant.io/docs/en/documentation_create_page.html#configuration" unless \
|
||||
" See: https://developers.home-assistant.io/docs/documenting/create-page#configuration" unless \
|
||||
TYPES.include? attr['type']
|
||||
end
|
||||
|
||||
|
@ -43,6 +43,7 @@ The following selectors are currently available:
|
||||
- [Number selector](#number-selector)
|
||||
- [Example number selectors](#example-number-selectors)
|
||||
- [Object selector](#object-selector)
|
||||
- [QR code selector](#qr-code-selector)
|
||||
- [RGB color selector](#rgb-color-selector)
|
||||
- [Select selector](#select-selector)
|
||||
- [State selector](#state-selector)
|
||||
@ -417,20 +418,6 @@ language:
|
||||
|
||||
The output of this selector is the ID of the conversation agent.
|
||||
|
||||
## Date selector
|
||||
|
||||
The date selector shows a date input that allows the user to specify a date.
|
||||
|
||||

|
||||
|
||||
This selector does not have any other options; therefore, it only has its key.
|
||||
|
||||
```yaml
|
||||
date:
|
||||
```
|
||||
|
||||
The output of this selector will contain the date in Year-Month-Day
|
||||
(`YYYY-MM-DD`) format, for example, `2022-02-22`.
|
||||
|
||||
## Country selector
|
||||
|
||||
@ -458,6 +445,21 @@ no_sort:
|
||||
|
||||
The output of this selector is an ISO 3166 country code.
|
||||
|
||||
## Date selector
|
||||
|
||||
The date selector shows a date input that allows the user to specify a date.
|
||||
|
||||

|
||||
|
||||
This selector does not have any other options; therefore, it only has its key.
|
||||
|
||||
```yaml
|
||||
date:
|
||||
```
|
||||
|
||||
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
|
||||
|
||||
The date selector shows a date and time input that allows the user to specify a
|
||||
@ -948,6 +950,39 @@ object:
|
||||
|
||||
The output of this selector is a YAML object.
|
||||
|
||||
## QR code selector
|
||||
|
||||
The QR code selector shows a QR code. It has no return value.
|
||||
|
||||

|
||||
|
||||
The QR code's data must be configured, and optionally, the scale, and error correction level can be set.
|
||||
The scale makes the QR code bigger or smaller.
|
||||
|
||||
{% configuration qr_code %}
|
||||
data:
|
||||
description: The data that should be represented in the QR code.
|
||||
type: any
|
||||
required: true
|
||||
scale:
|
||||
description: The scale factor to use, this will make the QR code bigger or smaller.
|
||||
type: integer
|
||||
required: false
|
||||
default: 4
|
||||
error_correction_level:
|
||||
description: The error correction level of the QR code, with a higher error correction level the QR code can be scanned even when some pieces are missing. Can be "low", "medium", "quartile" or "high".
|
||||
type: string
|
||||
required: false
|
||||
default: medium
|
||||
{% endconfiguration %}
|
||||
|
||||
```yaml
|
||||
qr_code:
|
||||
data: "https://home-assistant.io"
|
||||
scale: 5
|
||||
error_correction_level: quartile
|
||||
```
|
||||
|
||||
## RGB color selector
|
||||
|
||||
The RGB color selector allows the user to select an color from a color picker
|
||||
@ -1324,4 +1359,4 @@ The output of this selector is a list of triggers. For example:
|
||||
- platform: numeric_state
|
||||
entity_id: "sensor.outside_temperature"
|
||||
below: 20
|
||||
```
|
||||
```
|
BIN
source/images/blueprints/selector-qr-code.png
Normal file
BIN
source/images/blueprints/selector-qr-code.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.2 KiB |
Loading…
x
Reference in New Issue
Block a user