/** * Shutter one * * @param unique id for this widget * @param name of the shutter (optional) * @param the knx gad (groupaddress) for the up- and down- movement * @param the knx gad (groupaddress) for stopping the movement (optional) * @param the knx gad (groupaddress) for the actual position of the shutters * @param the knx gad (groupaddress) to move the shutters to the shade position (optional) */ {% macro one (id, txt, gad_move, gad_stop, gad_pos, gad_shade) %} {% import "basic.html" as basic %} /** Design */
{% if txt %} {{ txt }} {% endif %}
{{ basic.button(id|_('up'), gad_move, '', 'control_arrow_up.svg', 0, 'mini') }} {{ basic.button(id|_('down'), gad_move, '', 'control_arrow_down.svg', 1, 'mini') }}
{% if gad_stop %} {{ basic.button(id|_('stop'), gad_stop, '', 'audio_stop.svg', 1, 'mini') }} {% endif %} {% if gad_shade %} {{ basic.button(id|_('shade'), gad_shade, '', 'fts_shutter_50.svg', 1, 'mini') }} {% endif %}
{{ basic.shutter(id|_('shutter'), gad_pos, '', 0, 100, 1) }}
{% endmacro %} /** * Shutter two * * @param unique id for this widget * @param name of the shutter * @param the knx gad (groupaddress) for the up- and down- movement * @param the knx gad (groupaddress) for stopping the movement (optional) * @param the knx gad (groupaddress) for the actual position of the shutter * @param the knx gad (groupaddress) to move the shutters to the shade position (optional) */ {% macro two (id, txt, gad_move, gad_stop, gad_pos, gad_shade) %} {% import "basic.html" as basic %} /** Design */
{{ txt }}
{{ basic.button(id|_('up'), gad_move, '', 'control_arrow_up.svg', 0, 'mini') }} {{ basic.button(id|_('down'), gad_move, '', 'control_arrow_down.svg', 1, 'mini') }}
{% if gad_stop %} {{ basic.button(id|_('stop'), gad_stop, '', 'audio_stop.svg', 1, 'mini') }} {% endif %} {% if gad_shade %} {{ basic.button(id|_('shade'), gad_shade, '', 'fts_shutter_50.svg', 1, 'mini') }} {% endif %}
{{ basic.shutter(id|_('shutter'), gad_pos, '', 0, 100, 1) }}
{% endmacro %} /** * Shutter three * * @param unique id for this widget * @param name of the blind * @param the knx gad (groupaddress) for the actual position of the blinds * @param the knx gad (groupaddress) to move the shutters to the shade position (optional) */ {% macro three (id, txt, gad_pos, gad_shade) %} {% import "basic.html" as basic %} /** Design */
  {{ basic.slider(id|_('pos'), gad_pos, 0, 100, 5, 'vertical') }}
{{ txt }}
{% if gad_shade %} {{ basic.button(id|_('shade'), gad_shade, 'Beschatten', 'fts_shutter_50.svg', 1, 'mini') }}{% endif %}
{% endmacro %} /** * Shutter one line * * @param unique id for this widget * @param name of the blind * @param the knx gad (groupaddress) for the actual position of the blinds * @param the knx gad (groupaddress) to move the shutters to the shade position (optional) */ {% macro line (id, txt, gad_move, gad_stop, gad_pos, gad_shade) %} {% import "basic.html" as basic %} /** Design */
{% if txt %}
{{ txt }}
{% endif %}
{{ basic.button(id|_('up'), gad_move, '', 'control_arrow_up.svg', 0, 'mini') }} {{ basic.button(id|_('down'), gad_move, '', 'control_arrow_down.svg', 1, 'mini') }} {% if gad_stop %} {{ basic.button(id|_('stop'), gad_stop, '', 'audio_stop.svg', 1, 'mini') }} {% endif %} {% if gad_shade %} {{ basic.button(id|_('shade'), gad_shade, '', 'fts_shutter_50.svg', 1, 'mini') }} {% endif %}
{{ basic.slider(id|_('slider'), gad_pos, 0 , 100 , 5 ) }}
{% endmacro %}