Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions aiohasupervisor/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
AddonsSecurityOptions,
AddonsStats,
AddonStage,
AddonStartup,
AddonState,
AddonsUninstall,
AppArmor,
Expand Down Expand Up @@ -132,6 +133,7 @@
"RootInfo",
"AvailableUpdate",
"AddonStage",
"AddonStartup",
"AddonBoot",
"AddonBootConfig",
"CpuArch",
Expand Down
11 changes: 11 additions & 0 deletions aiohasupervisor/models/addons.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,16 @@ class AddonState(StrEnum):
ERROR = "error"


class AddonStartup(StrEnum):
"""AddonStartup type."""

APPLICATION = "application"
INITIALIZE = "initialize"
ONCE = "once"
SERVICES = "services"
SYSTEM = "system"


# --- OBJECTS ----


Expand Down Expand Up @@ -232,6 +242,7 @@ class InstalledAddonComplete(
udev: bool
video: bool
audio: bool
startup: AddonStartup
services: list[str]
discovery: list[str]
translations: dict[str, Any]
Expand Down
2 changes: 2 additions & 0 deletions tests/test_addons.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
AddonsOptions,
AddonsSecurityOptions,
AddonStage,
AddonStartup,
AddonState,
AddonsUninstall,
Capability,
Expand Down Expand Up @@ -64,6 +65,7 @@ async def test_addons_info(
assert addon.supervisor_role == SupervisorRole.MANAGER
assert addon.system_managed is False
assert addon.system_managed_config_entry is None
assert addon.startup == AddonStartup.SERVICES


async def test_addons_uninstall(
Expand Down