When working with entity forms I discovered this interesting piece detecting whether an entity is a newly saved one.
$result = $entity->save();
if ($result == SAVED_NEW) {
// This is a newly saved one
}
else {
// This is an updated one
}