/** * ----------------------------------------------------------------------------- * @package smartVISU * @author Martin Gleiß * @copyright 2012 - 2015 * @license GPL [http://www.gnu.de] * ----------------------------------------------------------------------------- */ {% extends "widget_clock.html" %} {% block example %}
Example
{% filter trim|escape|nl2br %}{% verbatim %} {{ clock.countdown('t', 'bath.light.switch', 'bath.light.timestamp', 'bath.light.timer', '5s'}} {{ clock.countdown('t2', 'bath.light.switch2', 'bath.light.timestamp2', 'bath.light.timer2', '1s', 'zero', ' ') }} {% endverbatim %}{% endfilter %}

Press the "Trigger" button to create a timestamp for the start time. Countdown will start only if a duration is entered. You can change start time and duration during runtime of the countdown. Timer will stop if the item is changed while the timestamp remains unchanged.

{{ basic.flip ('', 'bath.light.switch') }} Item to switch.      {{ lib.timestamp ('t', 'bath.light.timestamp') }}    =>   Timestamp for "now" is: {{ basic.print ('', 'bath.light.timestamp') }}

Enter timer duration in standard duration format e.g. "1h 45i 30s":
{{ basic.input ('', 'bath.light.timer', 'text')}}

Countdown Timer:   {{ clock.countdown('', 'bath.light.switch', 'bath.light.timestamp', 'bath.light.timer', '5s') }}


{{ basic.flip ('', 'bath.light.switch2') }} Item to switch.      {{ lib.timestamp ('t2', 'bath.light.timestamp2') }}    =>    Timestamp for "now" is: {{ basic.print ('', 'bath.light.timestamp2') }}

Enter timer duration in standard duration format e.g. "1h 45i 30s":
{{ basic.input ('', 'bath.light.timer2', 'text')}}

Countdown Timer:   {{ clock.countdown('', 'bath.light.switch2', 'bath.light.timestamp2', 'bath.light.timer2', '1s', 'zero', ' ') }}

{% endblock %}