mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-14 21:06:50 +00:00
Add a number comparison to the example.
This commit is contained in:
parent
1db6e1fed8
commit
550ee46abb
@ -64,9 +64,10 @@ sensor:
|
|||||||
kettle:
|
kettle:
|
||||||
friendly_name: 'Kettle'
|
friendly_name: 'Kettle'
|
||||||
{% raw %}value_template: >-
|
{% raw %}value_template: >-
|
||||||
{%- if is_state("switch.kettle", "standby") or
|
{%- if is_state("switch.kettle", "off") %}
|
||||||
is_state("switch.kettle", "off") %}
|
|
||||||
off
|
off
|
||||||
|
{% elif states.switch.kettle.attributes.kwh < 1000 %}
|
||||||
|
standby
|
||||||
{% elif is_state("switch.kettle", "on") %}
|
{% elif is_state("switch.kettle", "on") %}
|
||||||
on
|
on
|
||||||
{% else %}
|
{% else %}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user