I pretty much copied it exactly, except I noticed that name
was required for a GPIO switch. I did come across the pinout for your board, but didn’t realize it would be spec’d out different by just adding the TFT display.
Anyways, I made those I2C and GPIO switch changes, but received the same (or very similar) compilation errors. So, I commented out the GPIO switch block and pushed that. It compiled and flashed successfully, but now I’m getting something about ‘Can’t connect to ESPHome API,’ so I cannot tell if the board is happy with the I2C config, but HA still reports ‘Unavailable’ for the three entities, so I assume not.
←[32mINFO Starting log output from 10.0.0.38 using esphome API←[0m
←[33mWARNING Can't connect to ESPHome API for 10.0.0.38: Error connecting to ('10.0.0.38', 6053): [WinError 121] The semaphore timeout period has expired←[0m
←[32mINFO Trying to reconnect to 10.0.0.38 in the background←[0m
EDIT: Also, I don’t know if it counts for much, but I added the “-tft” to this block in ESPHome and it did validate.
esp32:
board: featheresp32-s2-tft
variant: esp32s2
framework:
type: esp-idf
version: recommended