const.py 777 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 = 0b0000000
  22. UNLOCKED = 0b0010000
  23. LOCKING = 0b0100000
  24. UNLOCKING = 0b0110000
  25. LOCKING_STOP = 0b1000000
  26. UNLOCKING_STOP = 0b1010000
  27. NOT_FULLY_LOCKED = 0b1100000 # Only EU lock type