A custom ESPHome component that broadcasts sensor data using the BTHome v2 BLE protocol for seamless Home Assistant integration.
Older versions are not supported, as this component uses cv.sensitive() for config redaction, introduced in recent ESPHome releases.
This fork contains fixes for nRF52/Zephyr and ESP32 (ESPHome 2026.4.x+) that are not yet merged in the original repo.
| Issue | Fix |
|---|---|
| #10 | Replace esp_timer_get_time() with k_uptime_get() for nRF52/Zephyr |
| #11 | Fix BLE advertisement offset for nRF52 (was 4, now 5) |
| #7 | Remove GAPEventHandler override broken in ESPHome 2026.4.0+ |
| #13 | Fix BT_DEVICE_NAME set without quotes in Zephyr |
| PR#2 | Fix BTHome encryption: Counter must precede MIC in advertisement ([Ciphertext] + [Counter] + [MIC]) |
- BTHome v2 Protocol - Full compliance with the BTHome specification
- Multi-Platform - ESP32 (ESP-IDF) and nRF52 (Zephyr)
- 60+ Sensor Types - Temperature, humidity, pressure, power, and more
- 28 Binary Sensor Types - Motion, door, window, smoke, etc.
- AES-CCM Encryption - Optional 128-bit encryption
- Home Assistant Auto-Discovery - Devices appear automatically
external_components:
- source:
type: git
url: https://github.com/AToom74/esphome-bthome
ref: main
components: [bthome]
sensor:
- platform: bme280_i2c
temperature:
id: temperature
humidity:
id: humidity
bthome:
sensors:
- type: temperature
id: temperature
- type: humidity
id: humidityFull documentation for this fork, including fork-specific behavior (nRF52 advertisement offset, encryption byte order, deep sleep) covered by the Fixes in this fork table above, is available on this fork's docs site:
Protocol specification: BTHome v2.
| Platform | Board Example | Framework |
|---|---|---|
| ESP32 | esp32dev, XIAO ESP32-C3 | ESP-IDF |
| nRF52840 | Seeed XIAO BLE | Zephyr |
MIT License