Magento – Magento 2: “Empty option” for programmatically populated select attribute

magento-2.1product-attributeselect

I have a product attribute dropdown select box that I populate via a source model.

The population works fine, but I want the first option in the list to be "Select one…". I've used the following code:

$options[] = array(
  'label' => 'Select one...',
  'value' => '',
);

But the result is as follows:

Duplicated empty item in select attribute

With the rendered HTML:

<select>
  <option value="">Select one...</option>
  <option data-title="Select one..." value="">Select one...</option>

What am I doing wrong?

Best Answer

@awarche's answer works:

You'll need to add a caption to your UI component field config:

<item name="caption" xsi:type="string" translate="true">Select one...</item>

I don't think an empty "Please select..." value belongs in a source model.