                {% if key == 0 and (item == 'switch' or item == 'stateswitch') %}
                    {% set switch_attribs = _context['line' ~ linenumber][key+key1+1] %}
                    <div class="switch popup_column_{{i}}">{{ basic.stateswitch(id~'switch'~key1~item~linenumber, switch_attribs[0], switch_attribs[1], switch_attribs[2], switch_attribs[3], switch_attribs[4], switch_attribs[5], switch_attribs[6]) }}</div>
                    {% set i = i+1 %}
                {% elseif key == 0 and item == 