Drupal 8: Best practice to get nid in form_submit
You're looking for $node = $form_state-&gt;getFormObject()-&gt;getEntity().

Oh, saw that you actually mentioned that. This is the correct way to do it.