From 5ec6fd65db9611d9f3839ebb5676bd44fc666906 Mon Sep 17 00:00:00 2001 From: Franck Nijhof Date: Mon, 27 Feb 2023 16:50:54 +0100 Subject: [PATCH] Clarify the example is below the sentence (#26349) --- source/_docs/configuration/templating.markdown | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/source/_docs/configuration/templating.markdown b/source/_docs/configuration/templating.markdown index 9526cfcec90..d3622b4d365 100644 --- a/source/_docs/configuration/templating.markdown +++ b/source/_docs/configuration/templating.markdown @@ -163,42 +163,48 @@ Other state examples: The examples below show the output of a temperature sensor with state `20.001`, unit `°C` and user configured presentation rounding set to 1 decimal. -This results in the number `20.001`: +The following example results in the number `20.001`: + {% raw %} ```text {{ states('sensor.temperature') }} ``` {% endraw %} -This results in the string `"20.0 °C"`: +The following example results in the string `"20.0 °C"`: + {% raw %} ```text {{ states('sensor.temperature', with_unit=True) }} ``` {% endraw %} -This results in the string `"20.001 °C"`: +The following example result in the string `"20.001 °C"`: + {% raw %} ```text {{ states('sensor.temperature', with_unit=True, rounded=False) }} ``` {% endraw %} -This results in the number `20.0`: +The following example results in the number `20.0`: + {% raw %} ```text {{ states('sensor.temperature', rounded=True) }} ``` {% endraw %} -This results in the number `20.001`: +The following example results in the number `20.001`: + {% raw %} ```text {{ states.sensor.temperature.state }} ``` {% endraw %} -This results in the string `"20.0 °C"`: +The following example results in the string `"20.0 °C"`: + {% raw %} ```text {{ states.sensor.temperature.state_with_unit }}