Clarify the example is below the sentence (#26349)

This commit is contained in:
Franck Nijhof 2023-02-27 16:50:54 +01:00
parent b969a9a961
commit 4534d7a669
No known key found for this signature in database
GPG Key ID: D62583BA8AB11CA3

View File

@ -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 }}