From 7f1871cdfdf870be5701886fb2a2af1d1cf9bf76 Mon Sep 17 00:00:00 2001 From: erffrfez Date: Sun, 12 Sep 2021 17:01:10 +0800 Subject: [PATCH] Use watt in example (#19248) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Joakim Sørensen --- source/_integrations/template.markdown | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/_integrations/template.markdown b/source/_integrations/template.markdown index 8ea8c0d971f..135703f54db 100644 --- a/source/_integrations/template.markdown +++ b/source/_integrations/template.markdown @@ -415,7 +415,7 @@ template: ### Multiline Example With an `if` Test -This example shows a multiple line template with an `if` test. It looks at a sensing switch and shows `on`/`off` in the frontend. +This example shows a multiple line template with an `if` test. It looks at a sensing switch and shows `on`/`off` in the frontend, and shows 'standby' if the power use is less than 1000 watts. {% raw %} @@ -426,7 +426,7 @@ template: state: > {% if is_state('switch.kettle', 'off') %} off - {% elif state_attr('switch.kettle', 'kwh')|float < 1000 %} + {% elif state_attr('switch.kettle', 'W')|float < 1000 %} standby {% elif is_state('switch.kettle', 'on') %} on