Basic-Widgets

basic.button basic.checkbox basic.colordisc basic.dual basic.flip basic.float basic.formula basic.glue basic.multistate basic.rgb basic.shifter basic.shutter basic.slider basic.switch basic.symbol basic.tank basic.text basic.trigger basic.value


basic.switch

A switch, build of two pics

Parameters
{{basic.switch(id, item, pic_on, pic_off, val_on, val_off, color_on, color_off) }}
id
unique id for this widget
item
a item
pic_on
the pic for the 'on' state (optional)
pic_off
the pic for the 'off' state (optional)
val_on
value send for the 'on' state (optional, default 1)
val_off
value send for the 'off' state (optional, default 0)
color_on
the color_on 'icon1' or e. g. '#f00' for red (default 'icon1' of the design)
color_off
the color_off e. g. '#f00' for red (default 'icon0' of the design)
Examples
{{ basic.switch('switch1', 'bath.light.switch') }}
{{ basic.switch('switch2', 'bath.light.switch', '', '', '', '', '#25ea4e', '#4176a9') }}
With other icons
{{ basic.switch('switch3', 'bath.blind.move.up', 'control_arrow_up.svg', 'control_arrow_down.svg') }}
{{ basic.switch('switch4', 'bath.blind.move.up', 'control_arrow_up.svg', 'control_arrow_down.svg', '', '', '#25ea4e', '#4176a9') }}

Author:Martin Gleiß and others

Widgets

Design

Misc