The election was a warning to centrists to do more to integrate immigrants.