Time/Clock-Widgets

clock.countdown clock.digiclock clock.iconclock clock.miniclock


clock.countdown

Displays a countdown

Parameters
{{ clock.countdown(id, item, starttime, duration, interval, stopmode, idletxt) }}
id
unique id for this widget (optional)
item
an item being switched
starttime
an item containing the start time of the countdown (timestamp)
duration
an item containing the duration of the countdown (h,i,s format)
interval
the countdown interval in seconds, e.g. '60s' (default: '10s')
stopmode
the mode of stopping the timer 'item' (default): countdown runs until item is changed; 'zero' = countdown stops at 00:00:00
idletxt
the text displayed when countdown is inactive (default '--:--:--')
Example
{{ 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', ' ') }}

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.

Item to switch.      Click to start    =>   Timestamp for "now" is: ---

Enter timer duration in standard duration format e.g. "1h 45i 30s":

Countdown Timer:    --:--:--


Item to switch.      Click to start    =>    Timestamp for "now" is: ---

Enter timer duration in standard duration format e.g. "1h 45i 30s":

Countdown Timer:   


Author: Wolfram v. Hülsen

Widgets

Design

Misc