* Relocate Bluetooth manager to habluetooth library
* Relocate Bluetooth manager to habluetooth library
* Relocate Bluetooth manager to habluetooth library
* fixes
* fix patching time
* fix more tests
* fix more tests
* split
* Bump habluetooth to 0.7.0
changelog: https://github.com/Bluetooth-Devices/habluetooth/compare/v0.6.1...v0.7.0
This is the big change that will move the manager so the HA
PR that will follow this will be a bit larger than the rest of them
since the manager is connected to everything
* fix types
* fix types
* fix types
* fix patch targets
* fix flakey logbook tests (will need another PR)
* mock shutdown
* bump again
* value can be a float now
* Revert "value can be a float now"
This reverts commit b7e7127143
.
* float
19 lines
566 B
Python
19 lines
566 B
Python
"""Models for bluetooth."""
|
|
from __future__ import annotations
|
|
|
|
from collections.abc import Callable
|
|
from enum import Enum
|
|
from typing import TYPE_CHECKING
|
|
|
|
from home_assistant_bluetooth import BluetoothServiceInfoBleak
|
|
|
|
if TYPE_CHECKING:
|
|
from .manager import HomeAssistantBluetoothManager
|
|
|
|
|
|
MANAGER: HomeAssistantBluetoothManager | None = None
|
|
|
|
|
|
BluetoothChange = Enum("BluetoothChange", "ADVERTISEMENT")
|
|
BluetoothCallback = Callable[[BluetoothServiceInfoBleak, BluetoothChange], None]
|
|
ProcessAdvertisementCallback = Callable[[BluetoothServiceInfoBleak], bool]
|