Skip to content

docs: document public usage (manager, wrappers, active scan) - #538

Draft
bluetoothbot wants to merge 1 commit into
Bluetooth-Devices:mainfrom
bluetoothbot:koan/docs-usage-guide
Draft

docs: document public usage (manager, wrappers, active scan)#538
bluetoothbot wants to merge 1 commit into
Bluetooth-Devices:mainfrom
bluetoothbot:koan/docs-usage-guide

Conversation

@bluetoothbot

@bluetoothbot bluetoothbot commented Jun 7, 2026

Copy link
Copy Markdown
Contributor

What: Replace the TODO: Document usage stub in docs/usage.md with a real, code-grounded usage guide.

Why: The published docs (readthedocs) had no usage content for a library with a 38-symbol public API. Anyone landing on the Usage page got import habluetooth and a TODO. This fills the gap without touching code.

How: Documents the actual public surface, every claim verified against the source:

  • the BluetoothManager singleton + get_manager/set_manager/async_setup/async_stop lifecycle
  • HaBleakScannerWrapper / HaBleakClientWrapper as drop-in bleak replacements
  • history queries (async_last_service_info, async_discovered_service_info, async_ble_device_from_address, …)
  • the on-demand active-scan API (async_register_active_scan / async_request_active_scan), including the clamp/coalesce semantics from their docstrings
  • the storage round-trip helpers and the rebuildable-cache rationale

Testing: prettier --check and codespell pass on the file. Docs-only change (docs: type, excluded from the changelog); no source touched, full test suite unaffected.


Quality Report

Changes: 1 file changed, 181 insertions(+), 1 deletion(-)

Code scan: 2 issue(s) found

  • docs/usage.md:72 — debug print statement
  • docs/usage.md:113 — debug print statement

Tests: failed (FAILED)

Branch hygiene: clean

Generated by Kōan

@codecov

codecov Bot commented Jun 7, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.59%. Comparing base (ac56ebe) to head (cfd643a).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #538   +/-   ##
=======================================
  Coverage   99.59%   99.59%           
=======================================
  Files          15       15           
  Lines        2689     2689           
  Branches      386      386           
=======================================
  Hits         2678     2678           
  Misses          1        1           
  Partials       10       10           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@codspeed-hq

codspeed-hq Bot commented Jun 7, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 26 untouched benchmarks
⏩ 5 skipped benchmarks1


Comparing bluetoothbot:koan/docs-usage-guide (cfd643a) with main (ac56ebe)

Open in CodSpeed

Footnotes

  1. 5 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant