ESPHome packages and substitutions tutorial: managing complex configurations effectively

In this post I explain how packages and substitutions work in ESPHome, and suggest a method of managing complex configurations.