Fix the display of default values (#18094)

The `{% configuration %}` section uses yaml and some jekyll template to generate the html output of the configuration description. However, yaml parses the raw values `ON` and `OFF` as booleans, which are then displayed as `true` and `false` in the final rendered html. This change adds quotes around those values so that they are parsed as strings and displayed as is in the html.
This commit is contained in:
Mike Meessen 2021-06-05 19:48:44 +02:00 committed by GitHub
parent 5ba9cc9ffd
commit 0f420992d8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -49,12 +49,12 @@ body_on:
description: "The body of the POST request that commands the switch to become enabled. This value can be a [template](/topics/templating/)."
required: false
type: string
default: ON
default: "ON"
body_off:
description: "The body of the POST request that commands the switch to become disabled. This value can also be a [template](/topics/templating/)."
required: false
type: string
default: OFF
default: "OFF"
is_on_template:
description: "A [template](/docs/configuration/templating/#processing-incoming-data) that determines the state of the switch from the value returned by the GET request on the resource URL. This template should compute to a boolean (True or False). If the value is valid JSON, it will be available in the template as the variable `value_json`. Default is equivalent to `'{% raw %}{{ value_json == body_on }}{% endraw %}'`. This means that by default, the state of the switch is on if and only if the response to the GET request matches."
required: false