mirror of
https://github.com/home-assistant/core.git
synced 2025-08-03 20:55:10 +02:00
Add slots to bluetooth matcher objects (#109768)
This commit is contained in:
@@ -90,6 +90,8 @@ def seen_all_fields(
|
||||
class IntegrationMatcher:
|
||||
"""Integration matcher for the bluetooth integration."""
|
||||
|
||||
__slots__ = ("_integration_matchers", "_matched", "_matched_connectable", "_index")
|
||||
|
||||
def __init__(self, integration_matchers: list[BluetoothMatcher]) -> None:
|
||||
"""Initialize the matcher."""
|
||||
self._integration_matchers = integration_matchers
|
||||
@@ -159,6 +161,16 @@ class BluetoothMatcherIndexBase(Generic[_T]):
|
||||
any bucket and we can quickly reject the service info as not matching.
|
||||
"""
|
||||
|
||||
__slots__ = (
|
||||
"local_name",
|
||||
"service_uuid",
|
||||
"service_data_uuid",
|
||||
"manufacturer_id",
|
||||
"service_uuid_set",
|
||||
"service_data_uuid_set",
|
||||
"manufacturer_id_set",
|
||||
)
|
||||
|
||||
def __init__(self) -> None:
|
||||
"""Initialize the matcher index."""
|
||||
self.local_name: dict[str, list[_T]] = {}
|
||||
@@ -285,6 +297,8 @@ class BluetoothCallbackMatcherIndex(
|
||||
Supports matching on addresses.
|
||||
"""
|
||||
|
||||
__slots__ = ("address", "connectable")
|
||||
|
||||
def __init__(self) -> None:
|
||||
"""Initialize the matcher index."""
|
||||
super().__init__()
|
||||
|
Reference in New Issue
Block a user