132 lines
4.6 KiB
YAML
132 lines
4.6 KiB
YAML
#############################################
|
|
#############################################
|
|
#
|
|
#############################################
|
|
#############################################
|
|
|
|
#############################################
|
|
# Variable Substitutions
|
|
#############################################
|
|
substitutions:
|
|
devicename: "esp-btproxy1"
|
|
friendly_name: "BT Proxy 1"
|
|
description_comment: "D1 Mini ESP32 with BT Proxy Test"
|
|
api_key: !secret esp-btproxy1_api_key #unfortunately you can't use substitutions in secrets names
|
|
ota_pass: !secret esp-btproxy1_ota_pass #unfortunately you can't use substitutions in secrets names
|
|
mqtt_topic: "esphome" #main topic for the mqtt server, call it what you like
|
|
update_time: 30s #update time for for temp sensors etc
|
|
|
|
#############################################
|
|
# ESPHome
|
|
# https://esphome.io/components/esphome.html
|
|
#############################################
|
|
esphome:
|
|
name: ${devicename}
|
|
comment: ${description_comment} #appears on the esphome page in HA
|
|
#on_boot: #Initial Setting, will remember previous values (if set)
|
|
#priority: -200
|
|
#then:
|
|
|
|
|
|
#############################################
|
|
# ESP Platform and Framework
|
|
# https://esphome.io/components/esp32.html
|
|
#############################################
|
|
esp32:
|
|
board: esp32dev
|
|
framework:
|
|
#type: arduino
|
|
type: esp-idf #Suggested Use ESP-IDF Framework, or Plug Out the UART Cable Might Cause ESP32 Hang.
|
|
version: recommended #recommended, latest or dev
|
|
|
|
#############################################
|
|
# ESPHome Logging Enable
|
|
# https://esphome.io/components/logger.html
|
|
#############################################
|
|
logger:
|
|
level: INFO #INFO Level suggested, or DEBUG for testing
|
|
baud_rate: 0 #set to 0 for no logging via UART, needed if you are using it for other serial things (eg PZEM)
|
|
#esp8266_store_log_strings_in_flash: false
|
|
#tx_buffer_size: 64
|
|
|
|
#############################################
|
|
# Enable the Home Assistant API
|
|
# https://esphome.io/components/api.html
|
|
#############################################
|
|
api:
|
|
encryption:
|
|
key: ${api_key}
|
|
|
|
#############################################
|
|
# Enable Over the Air Update Capability
|
|
# https://esphome.io/components/ota.html?highlight=ota
|
|
#############################################
|
|
ota:
|
|
safe_mode: true #Safe mode will detect boot loops
|
|
password: ${ota_pass}
|
|
|
|
#############################################
|
|
# Wifi Settings
|
|
# https://esphome.io/components/wifi.html
|
|
#############################################
|
|
wifi:
|
|
ssid: !secret wifi_ssid
|
|
password: !secret wifi_password
|
|
#power_save_mode: LIGHT #https://esphome.io/components/wifi.html#wifi-power-save-mode
|
|
#manual_ip: #optional static IP address
|
|
#static_ip: 192.168.x.x
|
|
#gateway: 192.168.X.x
|
|
#subnet: 255.255.255.0
|
|
ap: #Details for fallback hotspot (captive portal) in case wifi connection fails https://esphome.io/components/wifi.html#access-point-mode
|
|
ssid: $devicename fallback AP
|
|
password: !secret fallback_ap_password
|
|
ap_timeout: 5min #default is 1min
|
|
|
|
#############################################
|
|
# Web Portal for display and monitoring
|
|
# Turning this off is probably a good idea to save resources.
|
|
# https://esphome.io/components/web_server.html
|
|
#############################################
|
|
web_server:
|
|
port: 80
|
|
# username: !secret web_server_username #probably a good idea to secure it
|
|
# password: !secret web_server_password
|
|
|
|
#############################################
|
|
# MQTT Monitoring
|
|
# https://esphome.io/components/mqtt.html?highlight=mqtt
|
|
# MUST also have api enabled if you enable MQTT
|
|
#############################################
|
|
mqtt:
|
|
broker: !secret mqtt_server
|
|
topic_prefix: ${mqtt_topic}/${devicename}
|
|
username: !secret mqtt_username
|
|
password: !secret mqtt_password
|
|
|
|
#############################################
|
|
# Bluetooth
|
|
# https://esphome.io/components/bluetooth_proxy.html
|
|
# https://esphome.io/components/esp32_ble_tracker.html
|
|
# Remember that this takes a LOT of processing. On the
|
|
# ESP32, enable the IDF framework, and disable the
|
|
# Web server component. Changing to the IDF framework
|
|
# needs to be via cable not OTA to change the
|
|
# partition setup.
|
|
#############################################
|
|
bluetooth_proxy:
|
|
active: true
|
|
|
|
esp32_ble_tracker:
|
|
|
|
#############################################
|
|
# General esp status LED
|
|
# https://esphome.io/components/status_led.html
|
|
#############################################
|
|
status_led:
|
|
pin:
|
|
number: GPIO2 #ESP32 Onboard LED
|
|
ignore_strapping_warning: True #https://esphome.io/guides/faq.html#why-am-i-getting-a-warning-about-strapping-pins
|
|
inverted: false
|
|
|
|
|