So far, I’m using ‘esphome’ from the CLI to prepare my ESP32. I’ve succesfully added a switch to turn on the on-board LED. But when I try to add a DHT11 sensor to the file:
Absolutely not, just a side note.
Perhaps you get better support for your problem here if you post your code and logs using code tags instead of tiny screenshot.
Hey man, just a couple things first. Please dont upload screenshots of your code/config! There are a couple of different ways to insert code so that it automatically uses the correcy syntax and alignment so people can actually see it and be able to help you!
Second thing is, is there a reason for why you created a “switch” entity for the onboard led light? Its common to be confused as hell at first with understanding the logic here and logically, ya you’d think you need a switch to toggle that light but, it works a little different than that.
You’ll also need to use the Output Component - ESP Output Component - ESPHome - Smart Home Made Simple but, since you should be reading the documentation that your using here then you would have easily figured that out all by yourself, right?!?!
Doing it that way will allow you to have access to functionality like dimming led’s, changing colors, changing the temperature, using light/led effects, etc, etc, and having an On/Off function as well because all of that is included when you configure an LED as a Light instead of a Switch so, i would suggest you change that personally.