This folder contains a custom Home Assistant integration for Danfoss Eco (eTRV) thermostats. It connects over BLE, performs the legacy key exchange flow, and exposes a climate entity plus sensors.
Original inspiration and protocol reference from Keton and AdamStrojek.
- Bluetooth discovery and guided setup flow
- Key retrieval during pairing (single flow)
- Climate entity with setpoint control
- Battery, reported name, last update, and optional room temperature sensors
- Debounced setpoint writes
- Copy
custom_components/danfoss_ecointo your Home Assistantcustom_components/directory. - Restart Home Assistant.
- Go to Settings → Devices & Services → Add Integration and search for Danfoss Eco.
- Follow the setup flow, and press/hold the thermostat button when prompted.
The Danfoss Eco eTRV has unusually slow BLE communication:
- Initial connection: ~27 seconds
- GATT service discovery: ~30 seconds
- Total time per operation: Up to 60-90 seconds
This is normal behavior for this device. The integration uses a 90-second connection timeout to accommodate this.
ESPHome Bluetooth proxies have a hardcoded 30-second timeout for GATT operations, which is often insufficient for the Danfoss Eco. If you see errors like:
Timeout waiting for BluetoothGATTReadResponse after 30.0s
Workaround: Install patched bleak-esphome
A PR (#264) has been submitted to allow custom timeouts. Until it's merged, you can install the patched version:
# SSH into your HA instance, then:
docker exec -it homeassistant bash
pip install --upgrade git+https://github.com/jonbng/bleak-esphome.git@feat/custom-gatt-timeout
exit
ha core restartNote: This gets overwritten on HA updates - you'll need to re-run after each update.
Alternative: Use direct Bluetooth instead of an ESPHome proxy:
- Ensure your Home Assistant host has a working Bluetooth adapter
- In Home Assistant, go to Settings → Devices & Services → Bluetooth
- Make sure the device connects via the local adapter, not a proxy
- The device must be in pairing mode to retrieve the secret key (press and hold the timer button until the display shows the pairing icon).
- Reads are unlocked by writing the PIN (default
0000) to the device before polling. - BLE access depends on your Home Assistant host Bluetooth setup.
- Due to the slow connection times, frequent polling is not recommended. The default poll interval is 1 hour.