__init__.py 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  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.device import SwitchbotEncryptedDevice
  17. from .devices.base_light import SwitchbotBaseLight
  18. from .devices.blind_tilt import SwitchbotBlindTilt
  19. from .devices.bot import Switchbot
  20. from .devices.bulb import SwitchbotBulb
  21. from .devices.ceiling_light import SwitchbotCeilingLight
  22. from .devices.curtain import SwitchbotCurtain
  23. from .devices.device import ColorMode, SwitchbotDevice
  24. from .devices.humidifier import SwitchbotHumidifier
  25. from .devices.light_strip import SwitchbotLightStrip
  26. from .devices.lock import SwitchbotLock
  27. from .devices.plug import SwitchbotPlugMini
  28. from .devices.relay_switch import SwitchbotRelaySwitch
  29. from .discovery import GetSwitchbotDevices
  30. from .models import SwitchBotAdvertisement
  31. __all__ = [
  32. "get_device",
  33. "close_stale_connections",
  34. "close_stale_connections_by_address",
  35. "parse_advertisement_data",
  36. "GetSwitchbotDevices",
  37. "SwitchBotAdvertisement",
  38. "SwitchbotAccountConnectionError",
  39. "SwitchbotApiError",
  40. "SwitchbotAuthenticationError",
  41. "SwitchbotEncryptedDevice",
  42. "ColorMode",
  43. "LockStatus",
  44. "SwitchbotBaseLight",
  45. "SwitchbotBulb",
  46. "SwitchbotCeilingLight",
  47. "SwitchbotDevice",
  48. "SwitchbotCurtain",
  49. "SwitchbotLightStrip",
  50. "SwitchbotHumidifier",
  51. "Switchbot",
  52. "SwitchbotPlugMini",
  53. "SwitchbotSupportedType",
  54. "SwitchbotModel",
  55. "SwitchbotLock",
  56. "SwitchbotBlindTilt",
  57. "SwitchbotRelaySwitch",
  58. ]