/** * ----------------------------------------------------------------------------- * @package smartVISU * @author Martin Gleiß, Wolfram v. Hülsen * @copyright 2012 - 2015 * @license GPL [http://www.gnu.de] * ----------------------------------------------------------------------------- */ {% extends "widget_status.html" %} {% block example %}
Examples
{% filter trim|escape|nl2br %}{% verbatim %} {{ status.toast('toast0', 'bath.light.switch', '', '', '', 'Test with own icon', 'See how light value changes if you press the button', 'scene_livingroom', '', 'bath.light.value', 'Quit', '20', 'true', 'false') }} {{ status.toast('toast1', 'bath.light.switch', '', '', '', 'Movement detected', 'This is the "success" template', '', 'success') }} {{ status.toast('toast2', 'bath.light.switch', '', '', '', 'Test info', 'This is the "info" template', '', 'info') }} {{ status.toast('toast3', 'bath.light.switch', '', '', '', 'WARNING!', 'This is the "warning" template', '', 'warning') }} {{ status.toast('toast4', 'bath.light.switch', '', '', '', 'E R R O R !', 'This is the "error" template', '', 'error') }} {% endverbatim %}{% endfilter %}
{{ status.toast('toast0', 'bath.light.switch', '', '', '', 'Test with own icon', 'See how light value changes if you press the button', 'scene_livingroom', '', 'bath.light.value', 'Quit', '20', 'true', 'false') }} {{ status.toast('toast1', 'bath.light.switch', '', '', '', 'Movement detected', 'This is the "success" template', '', 'success') }} {{ status.toast('toast2', 'bath.light.switch', '', '', '', 'Test info', 'This is the "info" template', '', 'info') }} {{ status.toast('toast3', 'bath.light.switch', '', '', '', 'WARNING!', 'This is the "warning" template', '', 'warning') }} {{ status.toast('toast4', 'bath.light.switch', '', '', '', 'E R R O R !', 'This is the "error" template', '', 'error') }}
Toggle the flipswitch in order to trigger the toast message
{{ basic.flip('','bath.light.switch')}}
The first example shows how to send a value to an item by the toast. Dim the light using the dimmer and then watch the light while closing the topmost toast via the "Quit" button
{{ device.dimmer('', '', 'bath.light.switch', 'bath.light.value', 0, 100, '', icon.light('', '','bath.light.value', 0, 100), icon.light('', '','bath.light.value', 0, 100) )}}

An item containing content, e.g. the video stream of a door station, can be displayed inside a toast. Send proper html code in the item or in the text field, e.g. '<img src ="<yourStreamURL>"'.
{% filter trim|escape|nl2br %}{% verbatim %} {{ status.toast('toast5', 'bath.light.switch', '','item.with.content', '', 'HEADER Bewegung erkannt', 'warning', '', 'warning') }} {% endverbatim %}{% endfilter %}
The result will look like this:
Content

Documentation for the jquery toast plugin: https://kamranahmed.info/toast {% endblock %}