From 09e1c0cb0c2ad5cf1e5af81b7dc63f1156987c57 Mon Sep 17 00:00:00 2001 From: DubhAd Date: Sun, 20 May 2018 11:03:43 +0100 Subject: [PATCH] Added format to two digits (#5398) Formatted the digit for the delay to two digits, rather than a random one or two. There have been multiple reports of the example in the doc not working for 1 through 9, and it needing formatted to two digits. --- source/_docs/scripts.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/_docs/scripts.markdown b/source/_docs/scripts.markdown index ef490f4de20..ecbe2124337 100644 --- a/source/_docs/scripts.markdown +++ b/source/_docs/scripts.markdown @@ -75,7 +75,7 @@ Delays are useful for temporarily suspending your script and start it at a later ```yaml # Waits however many minutes input_number.minute_delay is set to # Valid formats include HH:MM and HH:MM:SS -- delay: "00:{{ states('input_number.minute_delay')|int }}:00" +- delay: "00:{{ '%02d' % (states('input_number.minute_delay')|int) }}:00" ``` {% endraw %}