quad.dimmer
Dimmer with switching and dimming function. Be aware that the attributes differ from the basic dimmer widget!
Parameters
{{ quad.dimmer(id, linetext, item_switch, item_value, min, max, step, pic_on, pic_off, color_on, color_off, value_display, min_display, max_display, picpos, indicator, slider_orientation, item_uzsu, uzsu_attribs, formula, item_plot, icon_plot, item_auto, extpopup, locks, linetext_widget, place4, column_order) }}
id
unique id for this widget
linetext
text for the whole line
item_switch
an item for switching
item_value
an item for dimming
min
the minimum value if the slider is moved to total left (optional, default 0)
max
the maximum value if the slider is moved to total right (optional, default 255)
step
step between two values (optional, default 5)
pic_on
icon for 'on' state, can also be dynamic (optional, default is light_light)
pic_off
icon for 'off' state, can also be dynamic (optional, default is light_light)
color_on
color for 'on' state (optional)
color_off
color for 'off' state (optional)
value_display
how should the value be shown; possible options: 'input', 'handle', 'both', 'none' (optional, default 'input')
min_display
the minimum value to display if the slider is moved to total left if this should differ from sent/received value (optional, default like min)
max_display
the maximum value to display if the slider is moved to total right if this should differ from sent/received value (optional, default like max)
picpos
position of the switch: left (default) or right
indicator
activity indicator which is active until response (or a timeout is reached)
slider_orientation
if the dimmer slider should be implemented in the column directly.
* possible options: 'horizontal', 'vertical', 'bottomup', 'semicircle'. 'popup' or empty for popup.
item_uzsu
a gad/item for UZSU
uzsu_attribs
Array with standard UZSU parameters: pic_on, pic_off, valueType, valueParameterList, color_on, color_off. (optional)
formula
value type: '%' to recalculate 0-255 values to 0-100% (e.g. for lights) or any formula
- VAR1, VAR2, ... represent the corresponding item's value, VAR is an array of all item values
- SUM(VAR), AVG(VAR), SUB(VAR), MIN(VAR) and MAX(VAR) aggregate the values
item_plot
array with all plot.period attributes to show a plot in popup. Alternatively just the item to be plotted.
icon_plot
icon triggering the plot popup
item_auto
"root item" which holds stateengine information. show current state of stateengine/stateengine item. Adjust icons and states below accordingly
extpopup
Array of arrays for extended popup window. Use this to create an icon to open a popup with switches, sliders, flips or select menues.
First entry can either be "stateengine" to make the stateengine plugin icon the trigger for the popup or an icon (e.g. time_automatic).
After that you have to create an array for each line of the popup. In this array you first define the elements like switch, text, etc.,
followed by the attributes for each element as you would for the basic widget.
Possible elements are: header, text, slider, flip, switch, select
Example: ['stateengine', ['header', 'Suspendzeit'], [['switch', 'slider'], [switch_item, 'icon', [0,1], ['secur_open','secur_locked']],
[slider_item, slider_min, slider_max, slider_step, '', 'handle']]
locks
array with items for locking. You have to be aware of the order: item_lock, item_bwmlock (presence sensor), item_force (force on/off/neutral)
linetext_widget
Widget(s) to be shown right after linetext. Can be used to show a countdown or other additional information. Example: basic.symbol('', 'licht.og.essen.sa') - don't put basic.symbol() in high commas! (optional)
place4
placeholder attributes for future features, etc.
column_order
array with element description: Reorder elements to your liking (esp. relevant for smartphones as several columns might be too much)
possible elements are: 'switch', 'value_popup', 'value_slider', 'locks', 'uzsu', 'stateengine', 'plot', 'scenes', 'extpopup'
For empty columns either use ' ' or a number to define the column width (e.g. '40' = 40 pixels width)
Combine elements in one column by putting them in arrays. Standard is [['locks', 'switch'], 'value_popup', 'stateengine', 'uzsu', 'plot']
Example
['uzsu', 'stateengine', 'plot', 'value_popup', 'switch', 'locks', ' '] stateengine with popup (have to long tap to open popup!)
{{ quad.dimmer('dimmer1', 'Dimmer Example 1', 'licht.SA', 'licht.dimmen', 0, 255, 1, icon.light('','','licht.dimmen','','','blue'), icon.light('','','licht.dimmen'), 'blue', 'icon0', '', '', '100', 'right', 'blink', '', 'licht.dimmen.zeitschalter', ['', '', 'bool'], '%', 'licht.dimmen', '', 'licht.automatik', (stateengine['item1']), ['', 'bwm.sperren', 'licht.zwangvalue'], '', '', ['uzsu', 'stateengine', 'plot', 'value_popup', 'switch', 'locks', ' ']) }}
['switch', 'value_slider']
{{ quad.dimmer('dimmer2', 'Dimmer Example 2', 'licht.SA', 'licht.dimmen', 0, 255, 1, icon.light('','','licht.dimmen'), icon.light('','','licht.dimmen'), 'icon1', 'icon0', '', '', '100', '', '', '', '', '', '', '', '', '', '', '', '', '', ['switch', 'value_slider']) }}
[['locks','switch'], 'value_popup', 'extpopup', 'plot']
{{ quad.dimmer('dimmer3', 'Dimmer Example 3', 'licht.SA', 'licht.dimmen', 0, 255, 1, icon.light('','','licht.dimmen'), icon.light('','','licht.dimmen'), 'icon1', 'icon0', '', '', '100', 'left', 'blink', '', 'licht.dimmen.zeitschalter', '', '%', 'licht.dimmen', '', 'licht.automatik',
['edit_favorites.svg', ['switch', ['item1.lock', 'icon', [0,1], ['secur_open.svg','secur_locked.svg']]], ['flip', ['item1.flip', 'on', 'off', '0', '1']] ],
['', 'bwm.sperren', 'licht.zwangvalue'], '', '', [['locks','switch'], 'value_popup', 'extpopup', 'plot']) }}
Without column order
{{ quad.dimmer('dimmer4', 'Standard Example 4', 'licht.SA', 'licht.dimmen') }}
Author: Niko Will, Onkel Andy