__init__.py 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. """Library to handle connection with Switchbot."""
  2. from __future__ import annotations
  3. from bleak_retry_connector import (
  4. close_stale_connections,
  5. close_stale_connections_by_address,
  6. get_device,
  7. )
  8. from .adv_parser import SwitchbotSupportedType, parse_advertisement_data
  9. from .const import (
  10. LockStatus,
  11. SwitchbotAccountConnectionError,
  12. SwitchbotApiError,
  13. SwitchbotAuthenticationError,
  14. SwitchbotModel,
  15. )
  16. from .devices.base_light import SwitchbotBaseLight
  17. from .devices.blind_tilt import SwitchbotBlindTilt
  18. from .devices.bot import Switchbot
  19. from .devices.bulb import SwitchbotBulb
  20. from .devices.ceiling_light import SwitchbotCeilingLight
  21. from .devices.curtain import SwitchbotCurtain
  22. from .devices.device import ColorMode, SwitchbotDevice
  23. from .devices.humidifier import SwitchbotHumidifier
  24. from .devices.light_strip import SwitchbotLightStrip
  25. from .devices.lock import SwitchbotLock
  26. from .devices.plug import SwitchbotPlugMini
  27. from .discovery import GetSwitchbotDevices
  28. from .models import SwitchBotAdvertisement
  29. __all__ = [
  30. "get_device",
  31. "close_stale_connections",
  32. "close_stale_connections_by_address",
  33. "parse_advertisement_data",
  34. "GetSwitchbotDevices",
  35. "SwitchBotAdvertisement",
  36. "SwitchbotAccountConnectionError",
  37. "SwitchbotApiError",
  38. "SwitchbotAuthenticationError",
  39. "ColorMode",
  40. "LockStatus",
  41. "SwitchbotBaseLight",
  42. "SwitchbotBulb",
  43. "SwitchbotCeilingLight",
  44. "SwitchbotDevice",
  45. "SwitchbotCurtain",
  46. "SwitchbotLightStrip",
  47. "SwitchbotHumidifier",
  48. "Switchbot",
  49. "SwitchbotPlugMini",
  50. "SwitchbotSupportedType",
  51. "SwitchbotModel",
  52. "SwitchbotLock",
  53. "SwitchbotBlindTilt",
  54. ]