mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-17 06:16:50 +00:00
Clarify the example is below the sentence (#26349)
This commit is contained in:
parent
ce8aea06fe
commit
5ec6fd65db
@ -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.
|
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 %}
|
{% raw %}
|
||||||
```text
|
```text
|
||||||
{{ states('sensor.temperature') }}
|
{{ states('sensor.temperature') }}
|
||||||
```
|
```
|
||||||
{% endraw %}
|
{% endraw %}
|
||||||
|
|
||||||
This results in the string `"20.0 °C"`:
|
The following example results in the string `"20.0 °C"`:
|
||||||
|
|
||||||
{% raw %}
|
{% raw %}
|
||||||
```text
|
```text
|
||||||
{{ states('sensor.temperature', with_unit=True) }}
|
{{ states('sensor.temperature', with_unit=True) }}
|
||||||
```
|
```
|
||||||
{% endraw %}
|
{% endraw %}
|
||||||
|
|
||||||
This results in the string `"20.001 °C"`:
|
The following example result in the string `"20.001 °C"`:
|
||||||
|
|
||||||
{% raw %}
|
{% raw %}
|
||||||
```text
|
```text
|
||||||
{{ states('sensor.temperature', with_unit=True, rounded=False) }}
|
{{ states('sensor.temperature', with_unit=True, rounded=False) }}
|
||||||
```
|
```
|
||||||
{% endraw %}
|
{% endraw %}
|
||||||
|
|
||||||
This results in the number `20.0`:
|
The following example results in the number `20.0`:
|
||||||
|
|
||||||
{% raw %}
|
{% raw %}
|
||||||
```text
|
```text
|
||||||
{{ states('sensor.temperature', rounded=True) }}
|
{{ states('sensor.temperature', rounded=True) }}
|
||||||
```
|
```
|
||||||
{% endraw %}
|
{% endraw %}
|
||||||
|
|
||||||
This results in the number `20.001`:
|
The following example results in the number `20.001`:
|
||||||
|
|
||||||
{% raw %}
|
{% raw %}
|
||||||
```text
|
```text
|
||||||
{{ states.sensor.temperature.state }}
|
{{ states.sensor.temperature.state }}
|
||||||
```
|
```
|
||||||
{% endraw %}
|
{% endraw %}
|
||||||
|
|
||||||
This results in the string `"20.0 °C"`:
|
The following example results in the string `"20.0 °C"`:
|
||||||
|
|
||||||
{% raw %}
|
{% raw %}
|
||||||
```text
|
```text
|
||||||
{{ states.sensor.temperature.state_with_unit }}
|
{{ states.sensor.temperature.state_with_unit }}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user