hass-core/homeassistant
J. Nick Koston 6b931b208f
Small cleanups to bluetooth internals (#92045)
* Small cleanups to bluetooth internals

Improve the performance of _async_on_advertisement

Fixes

```
tests/components/bluetooth/test_models.py::test_ble_device_with_proxy_client_out_of_connections_uses_best_available
tests/components/bluetooth/test_models.py::test_ble_device_with_proxy_client_out_of_connections_uses_best_available_macos
  /Users/bdraco/home-assistant/homeassistant/components/bluetooth/wrappers.py:226: FutureWarning: This method will be removed future version, pass the callback to the BleakClient constructor instead.
    self._backend.set_disconnected_callback(

tests/components/bluetooth/test_models.py::test_ble_device_with_proxy_client_out_of_connections_uses_best_available_macos
  /Users/bdraco/home-assistant/tests/components/bluetooth/test_models.py:506: FutureWarning: BLEDevice.metadata is deprecated and will be removed in a future version of Bleak, use AdvertisementData instead
    switchbot_proxy_device_no_connection_slot.metadata["delegate"] = 0

tests/components/bluetooth/test_models.py::test_ble_device_with_proxy_client_out_of_connections_uses_best_available_macos
  /Users/bdraco/home-assistant/tests/components/bluetooth/test_models.py:521: FutureWarning: BLEDevice.metadata is deprecated and will be removed in a future version of Bleak, use AdvertisementData instead
    switchbot_proxy_device_has_connection_slot.metadata["delegate"] = 0

tests/components/bluetooth/test_models.py::test_ble_device_with_proxy_client_out_of_connections_uses_best_available_macos
  /Users/bdraco/home-assistant/tests/components/bluetooth/test_models.py:535: FutureWarning: BLEDevice.metadata is deprecated and will be removed in a future version of Bleak, use AdvertisementData instead
    switchbot_device.metadata["delegate"] = 0

```

* put back kwargs
2023-04-26 11:16:34 +02:00
..
auth Cache decode of JWT tokens (#90013) 2023-03-22 16:03:41 -10:00
backports Add Self typing (1) [mypy 1.0] (#87598) 2023-02-06 22:29:47 -06:00
brands Remove xbox_live integration (#90592) 2023-03-31 14:30:04 -04:00
components Small cleanups to bluetooth internals (#92045) 2023-04-26 11:16:34 +02:00
generated Add Anova integration (#86254) 2023-04-22 18:05:14 -05:00
helpers Move TriggerBaseEntity into helpers (#91945) 2023-04-25 09:56:40 +02:00
scripts Adjust registry access in scripts (#88884) 2023-02-28 21:58:47 -05:00
util Use order in preferred regions list (#91959) 2023-04-24 14:12:38 -04:00
__init__.py
__main__.py
block_async_io.py Update mypy to 1.1.1 (#89268) 2023-03-08 22:57:54 +01:00
bootstrap.py Ensure dependencies are awaited correctly when setting up integrations (#91454) 2023-04-21 08:33:50 +02:00
config.py Add ComponentProtocol to improve type checking (#90586) 2023-03-31 14:19:58 -04:00
config_entries.py Only check support_entry_unload/support_remove_from_device once (#92041) 2023-04-26 10:23:18 +02:00
const.py Bump version to 2023.5.0dev0 (#90477) 2023-03-29 16:46:32 -04:00
core.py Add a name to the background service call tasks (#91252) 2023-04-11 19:23:25 -10:00
data_entry_flow.py Use slots for discovery dataclasses (#90751) 2023-04-04 12:44:59 +02:00
exceptions.py Make dataclasses in HA core slotted (#91208) 2023-04-11 07:58:28 -10:00
loader.py Make dataclasses in HA core slotted (#91208) 2023-04-11 07:58:28 -10:00
package_constraints.txt Bump hass-nabucasa from 0.66.1 to 0.66.2 (#92054) 2023-04-26 10:47:41 +02:00
requirements.py
runner.py Make dataclasses in HA core slotted (#91208) 2023-04-11 07:58:28 -10:00
setup.py Ensure dependencies are awaited correctly when setting up integrations (#91454) 2023-04-21 08:33:50 +02:00
strings.json Add state translations for helpers (#90356) 2023-03-27 16:19:25 -04:00