1
0
mirror of https://github.com/home-assistant/core.git synced 2026-08-06 21:35:13 +01:00
Files
core/homeassistant/components/bluetooth/models.py
T
2026-07-18 22:05:01 -10:00

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()