Created
January 13, 2024 18:30
-
-
Save letsautomatenet/f3442e06b401305a66124f747abf429b to your computer and use it in GitHub Desktop.
ESPHome YAML Template - ESP8266
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### START - Update this section with relevant details ### | |
substitutions: | |
device_name: "device-name-here" | |
friendly_name: Device Name Here | |
board_type: d1_mini | |
# ESPHome API used by Home Assistant, etc | |
# If you go to this page it generates one for you automatically! | |
# https://esphome.io/components/api.html#configuration-variables | |
api_key: "Generate a key and put it here" | |
ap_password: "randomsecurepassword" # Fallback WiFi Access Point password | |
ota_password: "differentrandomsecurepassword" # Password used to remotely flash firmware | |
### END ### | |
esphome: | |
name: ${device_name} | |
friendly_name: ${friendly_name} | |
esp8266: | |
board: ${board_type} | |
# Enable logging | |
logger: | |
# Enable Home Assistant API | |
api: | |
encryption: | |
key: ${api_key} | |
ota: | |
password: ${ota_password} | |
wifi: | |
ssid: !secret wifi_ssid | |
password: !secret wifi_password | |
# Enable fallback hotspot (captive portal) in case wifi connection fails | |
ap: | |
ssid: ${device_name} | |
password: ${ap_password} | |
captive_portal: | |
# Restart & Safe Mode Buttons | |
button: | |
- platform: restart | |
name: "Restart Device" | |
- platform: safe_mode | |
name: "Restart in Safe Mode" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment