Error occurred. Improv Wi-Fi serial not detected

this might help:

It is not clear exactly how you are using esphome and connecting to the esp. There are a couple of ways you could be doing that and some are more picky about the exact method.