CHANGELOG

v3.10.0 (2025-04-01)

Chores

  • Update dependabot.yml to increase GHA update frequency (53b72a1)

  • Update deps (#152, c4b0050)

dependabot does not yet support new pyproject.toml format

  • ci: Bump the github-actions group across 1 directory with 8 updates (#150, 1f67cb0)

  • chore(ci): bump the github-actions group across 1 directory with 8 updates

Bumps the github-actions group with 8 updates in the / directory:

| Package | From | To | | — | — | — | | actions/checkout | 3 | 4 | | actions/setup-python | 3 | 5 | | pre-commit/action | 2.0.3 | 3.0.1 | | wagoid/commitlint-github-action | 4.1.11 | 6.2.1 | | codecov/codecov-action | 3 | 5 | | python-semantic-release/python-semantic-release | 7.34.6 | 9.21.0 | | browniebroke/hacktoberfest-labeler-action | 2.2.0 | 2.3.0 | | tiangolo/issue-manager | 0.4.0 | 0.5.1 |

Updates actions/checkout from 3 to 4 - Release notes - Changelog - Commits

Updates actions/setup-python from 3 to 5 - Release notes - Commits

Updates pre-commit/action from 2.0.3 to 3.0.1 - Release notes - Commits

Updates wagoid/commitlint-github-action from 4.1.11 to 6.2.1 - Changelog - Commits

Updates codecov/codecov-action from 3 to 5 - Release notes - Changelog - Commits

Updates python-semantic-release/python-semantic-release from 7.34.6 to 9.21.0 - Release notes - Changelog

Commits

Updates browniebroke/hacktoberfest-labeler-action from 2.2.0 to 2.3.0 - Release notes - Changelog - Commits

Updates tiangolo/issue-manager from 0.4.0 to 0.5.1 - Release notes - Commits

— updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production

update-type: version-update:semver-major

dependency-group: github-actions

  • dependency-name: actions/setup-python dependency-type: direct:production

  • dependency-name: pre-commit/action dependency-type: direct:production

  • dependency-name: wagoid/commitlint-github-action dependency-type: direct:production

  • dependency-name: codecov/codecov-action dependency-type: direct:production

  • dependency-name: python-semantic-release/python-semantic-release dependency-type: direct:production

  • dependency-name: browniebroke/hacktoberfest-labeler-action dependency-type: direct:production

update-type: version-update:semver-minor

  • dependency-name: tiangolo/issue-manager dependency-type: direct:production

dependency-group: github-actions …

Signed-off-by: dependabot[bot] support@github.com

  • chore: update pyproject

  • chore: adjust actions


Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

Co-authored-by: J. Nick Koston nick@koston.org

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

updates: - github.com/commitizen-tools/commitizen: v4.2.2 → v4.4.1 - github.com/PyCQA/isort: 6.0.0 → 6.0.1 - github.com/PyCQA/flake8: 7.1.2 → 7.2.0

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

Features

v3.9.0 (2025-02-20)

Chores

  • Update dependabot.yml to include GHA (3158e20)

  • pre-commit.ci: Pre-commit autoupdate (#146, c9b4072)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

Features

  • Add internal stop_discovery method for habluetooth (#148, ae9feac)

v3.8.1 (2025-02-04)

Bug Fixes

Chores

  • deps: Bump bluetooth-adapters from 0.21.0 to 0.21.1 (#139, d6a5e37)

Bumps bluetooth-adapters from 0.21.0 to 0.21.1. - Release notes - Changelog - Commits

— updated-dependencies: - dependency-name: bluetooth-adapters dependency-type: direct:production

update-type: version-update:semver-patch …

Signed-off-by: dependabot[bot] support@github.com

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

  • deps: Bump dbus-fast from 2.30.2 to 2.32.0 (#141, 060341f)

  • deps-dev: Bump pytest-asyncio from 0.25.2 to 0.25.3 (#142, a29042c)

  • pre-commit.ci: Pre-commit autoupdate (#140, 6a4e839)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

v3.8.0 (2025-01-21)

Chores

  • deps: Bump bluetooth-adapters from 0.20.2 to 0.21.0 (#137, bc3045c)

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

  • deps-dev: Bump pytest-asyncio from 0.23.8 to 0.25.2 (#136, d71425a)

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

Features

  • Add method to fetch current allocations (#138, 4dc325b)

v3.7.0 (2025-01-18)

Chores

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

  • deps: Bump bluetooth-adapters from 0.16.2 to 0.20.2 (#128, c5f661d)

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

  • deps: Bump dbus-fast from 2.21.0 to 2.30.2 (#129, 717149c)

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

  • deps-dev: Bump pytest from 7.4.4 to 8.3.4 (#131, 9b5b266)

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

  • deps-dev: Bump pytest-asyncio from 0.19.0 to 0.23.8 (#130, 1506d86)

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

  • deps-dev: Bump pytest-cov from 3.0.0 to 6.0.0 (#132, 50a2912)

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

Co-authored-by: J. Nick Koston nick@koston.org

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

Features

  • Add support for getting callbacks on slot allocation change (#133, ae21ecb)

v3.6.0 (2024-10-05)

Chores

  • chore(pre-commit.ci): pre-commit autoupdate

updates: - github.com/commitizen-tools/commitizen: v2.42.0 → v3.27.0 - github.com/pre-commit/pre-commit-hooks: v4.4.0 → v4.6.0 - github.com/pre-commit/mirrors-prettier: v2.7.1 → v4.0.0-alpha.8 - github.com/asottile/pyupgrade: v3.3.1 → v3.16.0 - github.com/PyCQA/isort: 5.12.0 → 5.13.2

  • chore(pre-commit.ci): auto fixes


Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

updates: - github.com/commitizen-tools/commitizen: v3.29.0 → v3.29.1 - github.com/PyCQA/bandit: 1.7.9 → 1.7.10

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

Features

v3.5.0 (2024-04-10)

Features

  • Add device path to the disconnect debug logging (#111, 8e010b3)

v3.4.0 (2024-01-01)

Chores

Features

  • Add close_stale_connections_by_address (#110, 74de12f)

v3.3.0 (2023-10-25)

Features

  • Handle services changed during connecting (#108, 1c65413)

v3.2.1 (2023-09-14)

Bug Fixes

  • Correct fetching the global bluez manager when its not running (#106, 38c63a9)

v3.2.0 (2023-09-14)

Chores

  • Log exception type when device disappears (#105, 445bd43)

Features

  • Remove devices on cache clear to cleanup disk cache (#103, 349e0de)

v3.1.3 (2023-09-07)

Bug Fixes

v3.1.2 (2023-09-03)

Bug Fixes

  • Increase bleak safety timeout to allow for longer disconnect timeout (#101, 39380a7)

v3.1.1 (2023-07-25)

Bug Fixes

  • Check more often for a device to reappear after the adapter runs out of slots (#100, 4c9c9c0)

v3.1.0 (2023-07-19)

Chores

Features

  • Decrease backoff times (#97, 37b71c8)

  • Update the out of slots message to be more clear (#95, 9269a82)

v3.0.2 (2023-03-25)

Bug Fixes

  • Bluez services cache clear was ineffective (#93, ec86cb6)

v3.0.1 (2023-03-18)

Bug Fixes

v3.0.0 (2023-02-25)

Bug Fixes

  • Bump python-semantic-release (#90, c401988)

  • Lint (#89, c3b5ff8)

  • Typing for generic BleakClient classes and the retry_bluetooth_connection_error decorator (#86, 8ddf242)

  • fix: typing for the generic BleakClient client class

Using a bound TypeVar we can ensure that any client class we are dealing with is either BleakClient or a descendant of it and that type then stays consistent throughout the lifecycle.

Signed-off-by: Felix Kaechele felix@kaechele.ca

  • fix: typing for the retry_bluetooth_connection_error decorator

Use TypeVar together with ParamVar to drop the use of the unsafe cast operation.


Co-authored-by: J. Nick Koston nick@koston.org

Chores

BREAKING CHANGE: In preparation for the use of Python 3.10 typing features such as ParamSpec, which is unavailable on Python 3.9.

Following the schema of supporting the current and one previous Python release this drops support for Python 3.9.

Signed-off-by: Felix Kaechele felix@kaechele.ca

Co-authored-by: J. Nick Koston nick@koston.org

Breaking Changes

  • In preparation for the use of Python 3.10 typing features such as ParamSpec, which is unavailable on Python 3.9.

v2.13.1 (2023-01-12)

Bug Fixes

  • Make bluetooth-adapters install Linux only as well (#85, 910f0b7)

  • Only import from bluetooth_adapters when running on linux (#84, 51926f7)

v2.13.0 (2022-12-23)

Features

  • Remove freshen fallback logic since Home Assistant always provides us the best path to the device now (#83, 0954d2d)

v2.12.1 (2022-12-22)

Bug Fixes

  • _on_characteristic_value_changed in BleakSlotManager should accept any arguments (#82, 71cc37e)

v2.12.0 (2022-12-22)

Features

  • Add utility function to get device_source (#81, d72ce15)

v2.11.0 (2022-12-22)

Features

v2.10.2 (2022-12-12)

Bug Fixes

  • Stop trying to get devices from bluez if dbus setup times out (#78, a8da722)

v2.10.1 (2022-12-05)

Bug Fixes

  • Optimize IS_LINUX check in restore_discoveries (#77, f22eb33)

v2.10.0 (2022-12-05)

Features

  • Add restore_discoveries to fix missing devices (#76, f4432ac)

v2.9.0 (2022-12-03)

Features

v2.8.9 (2022-12-02)

Bug Fixes

  • Always log the connection attempt number (#74, 3306053)

v2.8.8 (2022-12-02)

Bug Fixes

  • Avoid logging connecting and connected since our BLEDevice may be stale (#72, 10e040c)

Chores

v2.8.7 (2022-12-02)

Bug Fixes

  • Enable service cache by default since esp32s are unreliable without it (#71, 0e90c1c)

v2.8.6 (2022-11-30)

Bug Fixes

  • Stop trying to check dbus once the socket is missing (#70, 74bd63b)

v2.8.5 (2022-11-19)

Bug Fixes

  • Teach the connector about more esp32 errors and times (#68, 09cb73d)

v2.8.4 (2022-11-11)

Bug Fixes

  • Increase backoff when local ble adapter runs out of connection slots (#67, cac7e57)

v2.8.3 (2022-11-06)

Bug Fixes

  • Adjust connect timeout to match macos write timeout (#66, 1396fdc)

v2.8.2 (2022-11-01)

Bug Fixes

  • Adjust backoffs for slower esp32 proxies (#64, 702a829)

v2.8.1 (2022-10-31)

Bug Fixes

  • Reduce logging as timeouts are expected (#63, 8b91838)

v2.8.0 (2022-10-31)

Features

  • Mark ESP_GATT_ERROR as a transient error (#62, 6d76ac4)

v2.7.0 (2022-10-30)

Features

v2.6.0 (2022-10-30)

Features

  • Teach the connector about transient esp32 errors (#60, 486fbbc)

v2.5.0 (2022-10-29)

Features

  • Increase timeouts now that bleak has resolved the timeout with service discovery and bluez (#59, 2a65e27)

v2.4.2 (2022-10-24)

Bug Fixes

  • Missing backoff execution with esp32 (#58, 3229424)

v2.4.1 (2022-10-24)

Bug Fixes

  • Ensure we back off for longer when out of slots (#57, efeced3)

v2.4.0 (2022-10-24)

Features

  • Improve handling of out of esp32 proxy connection slots (#56, 982b7ae)

v2.3.2 (2022-10-22)

Bug Fixes

  • Ensure client is returned when debug is off (#55, 7ddcac8)

v2.3.1 (2022-10-18)

Bug Fixes

  • Do not attempt to disconnect non-bluez bledevices (#54, 54b6c84)

v2.3.0 (2022-10-15)

Features

  • Add a retry_bluetooth_connection_error decorator (#53, 8bb706d)

v2.2.0 (2022-10-15)

Features

v2.1.3 (2022-09-26)

Bug Fixes

v2.1.2 (2022-09-26)

Bug Fixes

  • Adjust stale comment in freshen_ble_device (#50, 6cabc1f)

v2.1.1 (2022-09-26)

Bug Fixes

  • Set disconnected_callback in the constructor for newer bleak compat (#49, e2e25b3)

v2.1.0 (2022-09-26)

Features

v2.0.2 (2022-09-25)

Bug Fixes

  • Republish to fix python-semantic-release detecting the wrong version (#47, 65f3cf2)

  • Republish to fix semantic-release detecting the wrong version (#46, 0338653)

Features

BREAKING CHANGE: remove support for bleak < 0.18.0

Breaking Changes

  • Remove support for bleak < 0.18.0

v1.17.3 (2022-09-24)

Bug Fixes

v1.17.2 (2022-09-23)

Bug Fixes

  • Add a guard to freshen_ble_device so it can be called on non-linux (#43, 4558a67)

v1.17.1 (2022-09-15)

Bug Fixes

  • Adjust backoff times to reduce race risk (#40, 786b442)

v1.17.0 (2022-09-15)

Features

  • Provide a BLEAK_RETRY_EXCEPTIONS constant (#39, 55dc2e1)

v1.16.0 (2022-09-14)

Features

  • Do not disconnect unexpectedly connected devices if bleak supports reusing them (#35, be603ce)

Bleak 0.17 supports connecting to devices that are already connected in BlueZ.

We now detect this and adjust the BLEDevice to point to the already connected device so they do not have to wait for a connection.

This also fixes a race where the connection times out but the connection is actually made on the bus but we think it failed because we hit the timeout, so the next attempt will instead sail right though and be connected.

v1.15.1 (2022-09-13)

Bug Fixes

  • Revert requirement for newer bleak (#34, fe7ec26)

v1.15.0 (2022-09-12)

Features

v1.14.0 (2022-09-11)

Features

v1.13.2 (2022-09-11)

Bug Fixes

  • Race during disconnect when unexpectedly connected (#30, 2ceef9f)

v1.13.1 (2022-09-11)

Bug Fixes

  • Disconnect unexpectedly connected devices on other adapters (#29, 85a3efe)

v1.13.0 (2022-09-10)

Features

  • Make get_device and close_stale_connections part of all (#27, 4d7edfd)

v1.12.3 (2022-09-10)

Bug Fixes

  • Disconnect devices that are unexpectedly connected before connecting (#26, 47b31d3)

v1.12.2 (2022-09-10)

Bug Fixes

  • Handle already connected devices with no rssi value (#25, 0dfd3b0)

v1.12.1 (2022-09-10)

Bug Fixes

  • Get_device returning no device when already connected (#24, 1063b76)

v1.12.0 (2022-09-10)

Features

  • Add get_device helper to find already connected devices (#23, 595e6a0)

v1.11.1 (2022-09-10)

Bug Fixes

  • Handle Dbus EOFError while connecting (#22, b0bc92d)

v1.11.0 (2022-08-20)

Features

  • Handle stale BLEDevices when an adapter goes offline (#21, 012c94c)

v1.10.1 (2022-08-19)

Bug Fixes

  • Add workaround for when get_services raises (#20, 1c92f6e)

v1.10.0 (2022-08-19)

Features

v1.9.0 (2022-08-19)

Features

  • Add ble_device_callback to get a new BLEDevice between connect attempts (#18, 450268b)

v1.8.0 (2022-08-15)

Features

  • Add last known rssi to the debug log (#17, 1032317)

v1.7.2 (2022-08-12)

Bug Fixes

  • Handle device going in and out of range frequently (#16, 89b8c1b)

v1.7.1 (2022-08-12)

Bug Fixes

v1.7.0 (2022-08-11)

Features

  • Add ble_device_has_changed helper (#13, 0a23bb8)

v1.6.0 (2022-08-11)

Features

v1.5.0 (2022-08-08)

Features

  • Rethrow UnknownObject as BleakNotFoundError (#12, a07c50e)

v1.4.0 (2022-08-05)

Features

  • Improve error reporting when there is a poor connection (#10, d022777)

v1.3.0 (2022-08-04)

Features

  • Improve chance of connecting with poor signal (#9, f0322e7)

v1.2.0 (2022-08-03)

Features

  • Handle BrokenPipeError from dbus-next via bleak (#8, 21da55d)

v1.1.1 (2022-08-02)

Bug Fixes

  • Add back the bleak overall safety timeout (#7, f3f8ded)

v1.1.0 (2022-07-24)

Features

  • Pass additional kwargs to the client class (#6, 808e05b)

v1.0.2 (2022-07-22)

Bug Fixes

  • Push a new release now that pypi is working again (#5, 3480e22)

v1.0.1 (2022-07-22)

Bug Fixes

v1.0.0 (2022-07-22)

v0.1.1 (2022-07-22)

Bug Fixes

v0.1.0 (2022-07-22)

Features

v0.0.1 (2022-07-22)

Chores

Features