From 0f420992d88155d4da952ea341338f8513ec7625 Mon Sep 17 00:00:00 2001 From: Mike Meessen Date: Sat, 5 Jun 2021 19:48:44 +0200 Subject: [PATCH] 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. --- source/_integrations/switch.rest.markdown | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/_integrations/switch.rest.markdown b/source/_integrations/switch.rest.markdown index 9b7ee792589..1457f6986ad 100644 --- a/source/_integrations/switch.rest.markdown +++ b/source/_integrations/switch.rest.markdown @@ -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