mirror of
https://github.com/home-assistant/core.git
synced 2026-08-06 21:35:13 +01:00
4cb9d9fb91
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
19 lines
572 B
Python
19 lines
572 B
Python
"""Models for bluetooth."""
|
|
|
|
from collections.abc import Callable
|
|
from enum import Enum, auto
|
|
|
|
from home_assistant_bluetooth import BluetoothServiceInfoBleak
|
|
|
|
BluetoothChange = Enum("BluetoothChange", "ADVERTISEMENT")
|
|
type BluetoothCallback = Callable[[BluetoothServiceInfoBleak, BluetoothChange], None]
|
|
type ProcessAdvertisementCallback = Callable[[BluetoothServiceInfoBleak], bool]
|
|
|
|
|
|
class BluetoothCallbackReplay(Enum):
|
|
"""Controls how history is replayed when a callback is registered."""
|
|
|
|
OLDEST_FIRST = auto()
|
|
NEWEST_FIRST = auto()
|
|
DISABLED = auto()
|