% if instruments:

Choose a device:

% for deviceobj in instruments:
${deviceobj.devicename|h}
% endfor % else:

No device available

% endif