Saving form fields on custom entity
As far as I understand, you need to provide these values manually before the save, for example:

$entity-&gt;created = isset($entity-&gt;is_new) ? REQUEST_TIME : $entity-&gt;created;
$entity-&gt;changed = REQUEST_TIME;
$entity-&gt;uid = $user-&gt;uid;


or copy them directly from $form_state['values'].

I've found entityFormSubmit method from Inline Entity Form module which is manually copying all fields which are not fields to entity properties, so gave me the idea for this code:

$form_id = $form_state['build_info']['form_id'];
$entity = $form['#entity'] ?: $form_state['build_info']['args'][0];
$entity_type = $entity-&gt;entityType();
$entity_info = entity_get_info($entity_type);
$entity_values = drupal_array_get_nested_value($form_state['values'], $form['#parents']);
list(, , $bundle) = entity_extract_ids($entity_type, $entity);

$values_excluding_fields = $info['fieldable'] ? array_diff_key($entity_values, field_info_instances($this-&gt;entityType, $bundle)) : $entity_values;
foreach ($values_excluding_fields as $key =&gt; $value) {
  $entity-&gt;$key = $value;
} 
if ($entity_info['fieldable']) {
  field_attach_submit($entity_type, $entity, $form, $form_state);
}
$entity-&gt;created = isset($entity-&gt;is_new) ? REQUEST_TIME : $entity-&gt;created;
$entity-&gt;changed = REQUEST_TIME;
entity_save($entity_type, $entity);