diff --git a/plugins/configuration.rb b/plugins/configuration.rb index a516c106346..8d403b8c446 100644 --- a/plugins/configuration.rb +++ b/plugins/configuration.rb @@ -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 diff --git a/source/_docs/blueprint/selectors.markdown b/source/_docs/blueprint/selectors.markdown index cc70e88028b..4a9c030b790 100644 --- a/source/_docs/blueprint/selectors.markdown +++ b/source/_docs/blueprint/selectors.markdown @@ -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. - -![Screenshot of the Date selector](/images/blueprints/selector-date.png) - -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. + +![Screenshot of the Date selector](/images/blueprints/selector-date.png) + +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. + +![Screenshot of a QR code selector](/images/blueprints/selector-qr-code.png) + +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 -``` +``` \ No newline at end of file diff --git a/source/images/blueprints/selector-qr-code.png b/source/images/blueprints/selector-qr-code.png new file mode 100644 index 00000000000..62fe609ecbe Binary files /dev/null and b/source/images/blueprints/selector-qr-code.png differ