models.py 332 B

12345678910111213141516
  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