/**
* -----------------------------------------------------------------------------
* @package smartVISU
* @author Martin Gleiss
* @copyright 2012 - 2015
* @license GPL [http://www.gnu.de]
* -----------------------------------------------------------------------------
*/
{% extends "widget_device.html" %}
{% block example %}
Example
Dimmer with left or right alignment of the switch
{{ device.dimmer('', 'Dimmer', 'bath.light.switch', 'bath.light.value') }}
{{ device.dimmer('', 'Dimmer', 'bath.light.switch', 'bath.light.value', '', '', '', '', '', '', '', '', '', '', 'right') }}
{{ device.dimmer('', 'Dimmer', 'bath.light.switch', 'bath.light.value') }}
{{ device.dimmer('', 'Dimmer', 'bath.light.switch', 'bath.light.value', '', '', '', '', '', '', '', '', '', '', 'right') }}
Dimmer with a minimal value of 20 but which is displayed as 0.
{{ device.dimmer('', '', 'bath.light.switch', 'bath.light.value', 20, 100, 10, icon.light('', '','bath.light.value',20,100), icon.light(), 'green', '#ff0000', 'handle', 0 ) }}
{{ device.dimmer('', '', 'bath.light.switch', 'bath.light.value', 20, 100, 10, icon.light('', '','bath.light.value',20,100), icon.light(), 'green', '#ff0000', 'handle', 0 ) }}
Dimmer with a button-styled switch
{{ device.dimmer('', 'Dimmer', 'bath.light.switch', 'bath.light.value', '', '', '', '', '', '', '', '', '', '', 'left', 0, 'mini') }}
{{ device.dimmer('', 'Dimmer', 'bath.light.switch', 'bath.light.value', '', '', '', '', '', '', '', '', '', '', 'left', 0, 'mini')}}
While the dimmer text is normally aligned left it is centered if the dimmer resides in a block. To align it left again, use the following code in your visu.css on a dimmer with icon on the left side:
.block .dimmer-left p {
text-align: left;
}
Use the class ".dimmer-right" for dimmers with icon on the right side. A margin definition can be added for additional fine-positioning of the text.
{% endblock %}