Skip to content
Open
Show file tree
Hide file tree
Changes from 12 commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
d252528
fix: clear the CCCD when stopping notifications
bluetoothbot Jul 26, 2026
999f481
fix: warn on missing CCCD and keep the write error on stop_notify
bluetoothbot Aug 18, 2026
0db9ec5
fix: log failed proxy notify release and document best-effort CCCD clear
bluetoothbot Aug 18, 2026
f9eed67
fix: propagate cancelled notify release and keep stop_notify retryable
bluetoothbot Aug 18, 2026
306b2f7
fix: use pop when clearing notify state and correct the retry docstring
bluetoothbot Aug 19, 2026
59a4e36
fix: pin the CCCD clear to the standard notify timeout
bluetoothbot Aug 19, 2026
94b4267
chore(pre-commit.ci): auto fixes
pre-commit-ci[bot] Aug 19, 2026
97770e4
fix: raise on a missing CCCD in stop_notify and restore its atomic pop
bluetoothbot Aug 19, 2026
e9c4658
fix: resolve CI failures on #410 (attempt 1)
bluetoothbot Aug 19, 2026
4301332
fix: drop the notify entry when a stop_notify release fails after dis…
bluetoothbot Aug 19, 2026
ef26e9d
fix: retry a failed CCCD clear and abort notify entries that lose the…
bluetoothbot Aug 19, 2026
4106745
fix: only mark a CCCD clear retryable when a retry can succeed
bluetoothbot Aug 19, 2026
9b8767b
refactor: extract the cccd write and notify release helpers in stop_n…
bluetoothbot Aug 19, 2026
e415b85
refactor: deduplicate stop_notify test setup and trim redundant prose
bdraco Aug 20, 2026
481ec0c
refactor: drop the notify release retry machinery and track dirty CCC…
bluetoothbot Aug 20, 2026
0c06420
refactor: document the start_notify cccd contract and trim the notify…
bluetoothbot Aug 20, 2026
af25b5b
docs: correct the stop_notify retry contract and log the cccd charact…
bluetoothbot Aug 20, 2026
860d69a
refactor: restore the notify release on failure and extract the relea…
bluetoothbot Aug 20, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions docs/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -322,15 +322,15 @@ checks these flags before calling proxy-side APIs and degrades gracefully when
a flag is missing. The table below maps each public surface to the flag it
requires and what happens when the proxy firmware does not advertise it.

| Public surface | Required flag | Behavior when flag is absent |
| ----------------------------------------------- | --------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `BleakClient.connect` / GATT operations | `ACTIVE_CONNECTIONS` | The scanner is registered as non-connectable. Discovery still works; connect attempts are rejected by `bleak` before reaching this library. |
| Decoded vs. raw advertisements | `RAW_ADVERTISEMENTS` | Falls back to `subscribe_bluetooth_le_advertisements` (proxy-side decoded) instead of `subscribe_bluetooth_le_raw_advertisements`. Both paths feed the same scanner. |
| Scanner state / mode + on-demand active windows | `FEATURE_STATE_AND_MODE` | `subscribe_bluetooth_scanner_state` is skipped and the `APIClient` is not bound to the scanner, so `current_mode` / `requested_mode` stay at their defaults and `habluetooth` cannot open on-demand active-scan windows (`async_request_active_window` returns `False`). Connection-slot tracking is unaffected. |
| `connect(dangerous_use_bleak_cache=…)` | `REMOTE_CACHING` | The cached-services hint sent to the proxy is forced off, so the proxy re-discovers services on every connect. `dangerous_use_bleak_cache` still hits the on-host LRU in `_get_services` when populated, and `start_notify` skips the CCCD write because the firmware handles it. |
| `BleakClient.pair` / `unpair` | `PAIRING` | Raises `NotImplementedError("Pairing is not available in this version ESPHome; Upgrade the ESPHome version on the … device.")`. |
| `ESPHomeClient.clear_cache` | `CACHE_CLEARING` | Returns `True` after clearing only the on-host LRU caches; logs `"On device cache clear is not available with this ESPHome version; … Only memory cache will be cleared"`. No proxy round-trip. |
| `ESPHomeClient.set_connection_params` | `CONNECTION_PARAMS_SETTING` | Silently returns after logging `"Setting connection parameters is not available with ESPHome version …; Upgrade the ESPHome version on the device"`. No exception is raised. |
| Public surface | Required flag | Behavior when flag is absent |
| ----------------------------------------------- | --------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `BleakClient.connect` / GATT operations | `ACTIVE_CONNECTIONS` | The scanner is registered as non-connectable. Discovery still works; connect attempts are rejected by `bleak` before reaching this library. |
| Decoded vs. raw advertisements | `RAW_ADVERTISEMENTS` | Falls back to `subscribe_bluetooth_le_advertisements` (proxy-side decoded) instead of `subscribe_bluetooth_le_raw_advertisements`. Both paths feed the same scanner. |
| Scanner state / mode + on-demand active windows | `FEATURE_STATE_AND_MODE` | `subscribe_bluetooth_scanner_state` is skipped and the `APIClient` is not bound to the scanner, so `current_mode` / `requested_mode` stay at their defaults and `habluetooth` cannot open on-demand active-scan windows (`async_request_active_window` returns `False`). Connection-slot tracking is unaffected. |
| `connect(dangerous_use_bleak_cache=…)` | `REMOTE_CACHING` | The cached-services hint sent to the proxy is forced off, so the proxy re-discovers services on every connect. `dangerous_use_bleak_cache` still hits the on-host LRU in `_get_services` when populated, and `start_notify` skips the CCCD write -- and `stop_notify` the matching CCCD clear -- because the firmware handles both. |
| `BleakClient.pair` / `unpair` | `PAIRING` | Raises `NotImplementedError("Pairing is not available in this version ESPHome; Upgrade the ESPHome version on the … device.")`. |
| `ESPHomeClient.clear_cache` | `CACHE_CLEARING` | Returns `True` after clearing only the on-host LRU caches; logs `"On device cache clear is not available with this ESPHome version; … Only memory cache will be cleared"`. No proxy round-trip. |
| `ESPHomeClient.set_connection_params` | `CONNECTION_PARAMS_SETTING` | Silently returns after logging `"Setting connection parameters is not available with ESPHome version …; Upgrade the ESPHome version on the device"`. No exception is raised. |

If a method appears to silently do nothing, check the proxy's reported feature
flags first — the warning is logged at WARNING level on the
Expand Down
Loading
Loading