Basic-Widgets

basic.checkbox basic.color basic.flip basic.glue basic.icon basic.input basic.listview basic.offset basic.print basic.roundslider basic.select basic.shutter basic.skylight basic.slider basic.stateswitch basic.symbol basic.tank basic.trigger basic.window


basic.select

Select a specific value (e.g. a scene)

Parameters
{{ basic.select(id, item, type, value, icon, text, color_on, group, itemvals, itemtxts, indicator) }}
id
unique id for this widget (optional)
item
an item
type
type: 'menu', 'micro', 'mini', 'midi', 'icon' (optional, default: menu)
value
list of values (optional, default [0,1])
icon
list of icons for every button (optional) - not supported for type 'menu'
text
list of texts for every menu entry or button (optional)
color_on
the color for the on state of the buttons 'icon0' through 'icon5' or color names or codes like #f00 (optional, default: icon1) - not supported for type 'menu'
group
orientation of the controlgroup: 'horizontal', 'vertical' or 'none' for seperate buttons (optional, default: 'horizontal') - not supported for type 'menu'
itemvals
an item containing all selectable values (optional) - overrides existing value definitions, available for menu type only
itemtxts
an item containing the texts corresponding to the selectable values (optional even if itemvals is specified), available for menu type only
indicator
activity indicator which is active until response (or a timeout is reached); pass either a color, icon class, 'blink' or 'simulate'. 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)
You can also set an indicator icon, text and color by passing these as additional parameters in the icon, text and color arrays. Just provide one icon more than you have values to switch. A dynamic icon can be used also along with the 'simulate' option.
The indicator options will not be applied to the select element of type 'menu' which will convert all options to 'blink'.
More Information
Example
{{ basic.select('', 'bath.multistate', '', [5,6,7], '', ['Down', 'Left', 'Up']) }}
{{ basic.select('', 'bath.multistate', 'mini', [5,6,7]) }}
{{ basic.select('', 'bath.multistate', 'icon', [5,6,7], ['edit_numeric_1.svg', 'edit_numeric_2.svg', 'edit_numeric_3.svg']) }}
{{ basic.select('', 'bath.multistate', 'mini', [5,6,7], ['control_arrow_down.svg', 'control_arrow_left.svg', 'control_arrow_up.svg'], '', 'green', 'none') }}

{{ basic.select('', 'bath.multistate', 'icon', [5,6,7], ['control_arrow_down.svg', 'control_arrow_left.svg', 'control_arrow_up.svg'], ['Down', 'Left', 'Up'], 'green', 'vertical') }}
{{ basic.select('', 'bath.multistate', 'midi', [5,6,7], ['control_arrow_down.svg', 'control_arrow_left.svg', 'control_arrow_up.svg'], '', '', 'vertical') }}
Dynamic Select Values
List items can be used as dynamic option lists for the menu type. If a list item is given in the parameter "itemvals" it overrides the other value parameters given in the macro call. Optional texts can be defined by a second item in the parameter "itemtxts". If this is not defined the option values will be used as texts.
{{ basic.select('', 'bath.multistate', '', '', '', '', '', '', 'bath.list1', 'bath.list2') }}
Activity Indicator
The parameter "indictor" can be used to show different icons / colors / animations while the widget is waiting for the item update by the backend. For the grouped switches the options are the same as in basic.stateswitch. In "menu" mode the widget displays activity with a blinking select menu, only.

Author: Martin Gleiß and others