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.
This commit is contained in:
DubhAd 2018-05-20 11:03:43 +01:00 committed by Fabian Affolter
parent 692db79b72
commit 09e1c0cb0c

View File

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