basic.trigger
A widget to trigger a logic (e. g. in smarthomeNG)
Parameters
{{ basic.trigger(id, name, txt, icon, val, type, event, color, indicator) }}
id
unique id for this widget (optional)
name
the name of the trigger (logic)
txt
text printed on the button (optional)
icon
icon to show on the button (optional)
val
value to send if the button is pressed (optional, default 1)
type
type: 'micro', 'mini', 'midi' (optional, default: mini)
event
trigger event: 'button', 'page', 'both' (optional, default: button)
color
single color e. g. '#f00' for red or icon class. (optional)
indicator
activity indicator which is active until the timeout is reached; pass either a color, icon class or 'blink'. Timeout is 3s by default and can be set globally using the configuration key "indicator_duration". Add a colon and integer number to specify an individual timeout, e.g. 'blink:15' (optional)
This widget triggers a logic on the backend given by the parameter 'name'. The default function will show a button for manual triggering.
With the parameter 'event' set to 'page', the logic is being triggered automatically during page create (button is hidden) while 'both' enables both triggenring methods.
Examples
{{ basic.trigger('trigger1', 'Dev', '', 'check') }}
{{ basic.trigger('trigger2', 'Dev', 'Trigger', '', 1) }}
Author: Martin Gleiß and others