ESPHome devices lose their connection

I finally figured out how to overcome this annoying bug. I documented how to reproduce it here.