* Ensure filename is shown when YAML raises an error
fixes#5423fixes#5377
* Ensure filename is shown when YAML raises an error
fixes#5423fixes#5377
* Ensure filename is shown when YAML raises an error
fixes#5423fixes#5377
* Ensure filename is shown when YAML raises an error
fixes#5423fixes#5377
* Ensure filename is shown when YAML raises an error
fixes#5423fixes#5377
* Nextion TFT upload IDF memory optimization
This optimizes the memory in use for TFT upload when using `esp-idf` framework.
Basically, the engine establishes 3 connections to the the http/https server:
1. Fetch the file size (used to manage chunks and file size)
2. Transfer the 1st chunk (when it evaluates Nextion response to define either to continue from that point or to another point in the file)
3. Transfer the remaining data.
Until now, connection 1 was kept open during the whole process taking aprox 40kb of heap in a esp32dev (NSPanel in my tests) and the same amount of memory was needed to the 2nd and 3rd connections (which never competes to each other).
With this change, each connection is closed and released before opening the next one with a significant reduction on the required heap needed for this transfer.
This can still be improved to use a persistent connection, but I will look at this in the future, so it is not part of this change.
In addition to the better connection management, I've added quite a lot of log (mostly at VERBOSE level), which was used for troubleshooting here.
I was unsure about removing this. As it can be useful for others, I decided to keep it, but I will be fine about removing it if this is now in line with ESPHome best practices.
* clang-format
* Log response length