models.py 346 B

1234567891011121314151617
  1. """Library to handle connection with Switchbot."""
  2. from __future__ import annotations
  3. from dataclasses import dataclass
  4. from typing import Any
  5. from bleak.backends.device import BLEDevice
  6. @dataclass
  7. class SwitchBotAdvertisement:
  8. """Switchbot advertisement."""
  9. address: str
  10. data: dict[str, Any]
  11. device: BLEDevice
  12. rssi: int