enums.py 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. """Helper constants."""
  2. # pylint: disable=missing-class-docstring
  3. from enum import Enum
  4. class HacsGitHubRepo(str, Enum):
  5. """HacsGitHubRepo."""
  6. DEFAULT = "hacs/default"
  7. INTEGRATION = "hacs/integration"
  8. class HacsCategory(str, Enum):
  9. APPDAEMON = "appdaemon"
  10. INTEGRATION = "integration"
  11. LOVELACE = "lovelace"
  12. PLUGIN = "plugin" # Kept for legacy purposes
  13. NETDAEMON = "netdaemon"
  14. PYTHON_SCRIPT = "python_script"
  15. THEME = "theme"
  16. REMOVED = "removed"
  17. def __str__(self):
  18. return str(self.value)
  19. class HacsDispatchEvent(str, Enum):
  20. """HacsDispatchEvent."""
  21. CONFIG = "hacs_dispatch_config"
  22. ERROR = "hacs_dispatch_error"
  23. RELOAD = "hacs_dispatch_reload"
  24. REPOSITORY = "hacs_dispatch_repository"
  25. REPOSITORY_DOWNLOAD_PROGRESS = "hacs_dispatch_repository_download_progress"
  26. STAGE = "hacs_dispatch_stage"
  27. STARTUP = "hacs_dispatch_startup"
  28. STATUS = "hacs_dispatch_status"
  29. class RepositoryFile(str, Enum):
  30. """Repository file names."""
  31. HACS_JSON = "hacs.json"
  32. MAINIFEST_JSON = "manifest.json"
  33. class ConfigurationType(str, Enum):
  34. YAML = "yaml"
  35. CONFIG_ENTRY = "config_entry"
  36. class LovelaceMode(str, Enum):
  37. """Lovelace Modes."""
  38. STORAGE = "storage"
  39. AUTO = "auto"
  40. AUTO_GEN = "auto-gen"
  41. YAML = "yaml"
  42. class HacsStage(str, Enum):
  43. SETUP = "setup"
  44. STARTUP = "startup"
  45. WAITING = "waiting"
  46. RUNNING = "running"
  47. BACKGROUND = "background"
  48. class HacsDisabledReason(str, Enum):
  49. RATE_LIMIT = "rate_limit"
  50. REMOVED = "removed"
  51. INVALID_TOKEN = "invalid_token"
  52. CONSTRAINS = "constrains"
  53. LOAD_HACS = "load_hacs"
  54. RESTORE = "restore"