From a3bda5dde17e5fde20f3694895212039d02acff6 Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Fri, 4 Nov 2016 23:45:19 -0700 Subject: [PATCH] Fix liquid warnings --- source/_components/sensor.influxdb.markdown | 4 ++-- source/_components/switch.rest.markdown | 2 +- source/_components/switch.rfxtrx.markdown | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/source/_components/sensor.influxdb.markdown b/source/_components/sensor.influxdb.markdown index 43ed715a97c..c16839f1fa0 100644 --- a/source/_components/sensor.influxdb.markdown +++ b/source/_components/sensor.influxdb.markdown @@ -63,7 +63,7 @@ sensor: queries: - name: last value of foo unit_of_measurement: °C - value_template: '{{ value | round(1) }}' + value_template: '{% raw %}{{ value | round(1) }}{% endraw %}' group_function: last where: '"name" = ''foo''' measurement: '"°C"' @@ -71,7 +71,7 @@ sensor: database: db1 - name: Min for last hour unit_of_measurement: '%' - value_template: '{{ value | round(1) }}' + value_template: '{% raw %}{{ value | round(1) }}{% endraw %}' group_function: min where: '"entity_id" = ''salon'' and time > now() - 1h' measurement: '"%"' diff --git a/source/_components/switch.rest.markdown b/source/_components/switch.rest.markdown index 51c43af6497..d4f301149b2 100644 --- a/source/_components/switch.rest.markdown +++ b/source/_components/switch.rest.markdown @@ -30,7 +30,7 @@ Configuration variables: - **name** (*Optional*): Name of the REST switch. - **body_on** (*Optional*): The body of the POST request that commands the switch to become enabled. Default is "ON". This value can be a [template](/topics/templating/), which is useful if the POST request needs to depend on the state of the system. For example, to enable remote-temperature-sensor tracking on a radio thermostat, one has to send the current value of the remote temperature sensor. On can achieve this using the template `'{"rem_temp":{{states.sensor.bedroom_temp.state}}}'`. - **body_off** (*Optional*): The body of the POST request that commands the switch to become disabled. Default is "OFF". This value can also be a template. -- **is_on_template** (*Optional*): A [template](/topics/templating/) 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). Default is equivalent to `'{{ value.json == body_on }}'`. This means that by default, the state of the switch is on if and only if the response to the GET request matches `body_on`. +- **is_on_template** (*Optional*): A [template](/topics/templating/) 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). 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 `body_on`.

diff --git a/source/_components/switch.rfxtrx.markdown b/source/_components/switch.rfxtrx.markdown index 7e31df8da39..07f99181e72 100644 --- a/source/_components/switch.rfxtrx.markdown +++ b/source/_components/switch.rfxtrx.markdown @@ -57,7 +57,7 @@ If you need to generate codes for switches you can use a template (usefull for e - Go to home-assistant-IP:8123/dev-template - Use this code to generate a code: ```yaml -0b11000{{ range(0,700) | random | int }}bc0cfe0{{ range(0,10) | random | int }}010f70 +{% raw %}0b11000{{ range(0,700) | random | int }}bc0cfe0{{ range(0,10) | random | int }}010f70{% endraw %} ``` - Use this code to add a new switch in your configuration.yaml - Launch your homeassistant and go the website.