In ESPhome there is a button to create a new device which opens the editor with some basic configuration text inserted. I would like to know if this basic boilerplate text can be edited and expanded?
At present I just delete it and then paste in my own boiler plate, keeping the automatically generated OTA: key.
welcome
sure you can.
But be sure you know what you are doing .because if you remove network, or OTA or …you’ll need to re flash it with …wires .
Getting Started with ESPHome and Home Assistant — ESPHome
Hi tomdudu38,
Thanks for your reply and the warning about the OTA, too late though, I learned the hard way. I have decided I always want to get a signal strength report and battery level from my devices . Can I set the wizard up to always add the necessary text each time I create a new device configuration?
when you open the editor it ask you some questions to make you a first start configuration but you can enter whatever you want and delette it after to enter what you need exactly. ok?
so you can just copy-paste the basic code from device to another device.
You need to change the name and the platform/board type ( if you are using another board), IP( if you don’t use dhcp). that’s all.
all you need in a yaml.
esphome:
name: esp32bla # name
platform: ESP32 #<------cpu
board:
esp32dev # <---board type
wifi:
#fast_connect: true
ssid: yourwifi
password: yourpassw
ota: ###update other the air
logger: #####logs
api: ###connect to hassio
i don’t think you can edit the wizard without big headhache
A lot of people use includes for their standard code.
Or don’t use the + button. Use your favourite editor to write your yaml file as you like.
Thanks, include seems to work for me.