1
0

const.py 776 B

1234567891011121314151617181920212223242526272829303132333435
  1. """Library to handle connection with Switchbot."""
  2. from __future__ import annotations
  3. from enum import Enum
  4. DEFAULT_RETRY_COUNT = 3
  5. DEFAULT_RETRY_TIMEOUT = 1
  6. DEFAULT_SCAN_TIMEOUT = 5
  7. from .enum import StrEnum
  8. class SwitchbotModel(StrEnum):
  9. BOT = "WoHand"
  10. CURTAIN = "WoCurtain"
  11. HUMIDIFIER = "WoHumi"
  12. PLUG_MINI = "WoPlug"
  13. CONTACT_SENSOR = "WoContact"
  14. LIGHT_STRIP = "WoStrip"
  15. METER = "WoSensorTH"
  16. MOTION_SENSOR = "WoPresence"
  17. COLOR_BULB = "WoBulb"
  18. CEILING_LIGHT = "WoCeiling"
  19. LOCK = "WoLock"
  20. class LockStatus(Enum):
  21. LOCKED = 0
  22. UNLOCKED = 1
  23. LOCKING = 2
  24. UNLOCKING = 3
  25. LOCKING_STOP = 4 # LOCKING_BLOCKED
  26. UNLOCKING_STOP = 5 # UNLOCKING_BLOCKED
  27. NOT_FULLY_LOCKED = 6 # LATCH_LOCKED - Only EU lock type