My ESPHome configuration for all my ESPHome devices.
-
Clone the repository.
git clone git@github.com:jwillikers/esphome-config.git
-
Change to the repository’s directory.
cd esphome-config -
Copy the
secrets.yaml.templatetemplate tosecrets.yamlin the ESPHome configuration directory.cp esphome/secrets.yaml.template esphome/secrets.yaml
-
Ensure that only the owner can read and write the sensitive
secrets.yamlfile.chmod 0600 esphome/secrets.yaml
-
Add your WiFi SSID and password to the
secrets.yamlfile. In addition to these, each device should have it’s own password for OTA updates and the fallback WiFi hotspot. Each device also requires a pre-shared encryption key for communicating securely with the Home Assistant API. See the Native API - for each device Configuration Variables section of the ESPHome documentation for details. Home Assistant will prompt you for the device’s key once the device has been updated.
The OTA and WiFi hotspot passwords can be generated with this command.
tr --complement --delete '[:alnum:]' < /dev/urandom | fold --width=32 | head --lines=1The API encryption keys must be 32-bit base64 encoded strings, which can be generated with this OpenSSL command.
openssl rand -base64 32If you don’t have or want to install OpenSSL, the following command will also work.
tr --complement --delete '[:alnum:]' < /dev/urandom | fold --width=32 | head --bytes=32 | base64Contributions in the form of issues, feedback, and even pull requests are welcome. Make sure to adhere to the project’s Code of Conduct.
This project is built on the hard work of countless open source contributors. Several of these projects are enumerated below.
Refer to the project’s Code of Conduct for details.
This repository is licensed under the GPLv3, a copy of which is provided in the license file.
© 2022-2025 Jordan Williams