Quick Start
This guide will help you create a simple BTHome temperature and humidity sensor.
Choose Your Platform
Section titled “Choose Your Platform”esphome: name: bthome-sensor friendly_name: BTHome Sensor
esp32: board: esp32dev framework: type: esp-idf
logger:
wifi: ap: ssid: "BTHome-Sensor"
captive_portal:
external_components: - source: type: git url: https://github.com/dz0ny/esphome-bthome ref: main components: [bthome]
# I2C for BME280 sensori2c: sda: GPIO21 scl: GPIO22 scan: true
sensor: - platform: bme280_i2c address: 0x76 temperature: id: bme_temperature name: "Temperature" humidity: id: bme_humidity name: "Humidity" pressure: id: bme_pressure name: "Pressure" update_interval: 30s
# BTHome configurationbthome: sensors: - type: temperature id: bme_temperature - type: humidity id: bme_humidity - type: pressure id: bme_pressureesphome: name: bthome-sensor friendly_name: BTHome Sensor
nrf52: board: xiao_ble bootloader: adafruit
logger:
wifi: ap: ssid: "BTHome-Sensor"
captive_portal:
external_components: - source: type: git url: https://github.com/dz0ny/esphome-bthome ref: main components: [bthome]
# I2C for BME280 sensori2c: sda: 4 scl: 5 scan: true
sensor: - platform: bme280_i2c address: 0x76 temperature: id: bme_temperature name: "Temperature" humidity: id: bme_humidity name: "Humidity" pressure: id: bme_pressure name: "Pressure" update_interval: 30s
# BTHome configurationbthome: sensors: - type: temperature id: bme_temperature - type: humidity id: bme_humidity - type: pressure id: bme_pressureBuild and Flash
Section titled “Build and Flash”-
Compile the configuration:
Terminal window esphome compile your_config.yaml -
Flash to your device:
Terminal window esphome upload your_config.yaml -
Monitor the logs to verify it’s working:
Terminal window esphome logs your_config.yaml
Verify in Home Assistant
Section titled “Verify in Home Assistant”Once your device is running:
- Open Home Assistant
- Go to Settings → Devices & Services → BTHome
- Your device should appear automatically
- Click Configure to add it
You should now see your temperature, humidity, and pressure sensors in Home Assistant!
What’s Next?
Section titled “What’s Next?”- Configuration Options - Customize advertising intervals and TX power
- Add More Sensors - See all supported sensor types
- Enable Encryption - Secure your sensor data