mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-22 16:56:50 +00:00
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:
parent
5ba9cc9ffd
commit
0f420992d8
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user