Skip to content

Commit

Permalink
Merge pull request #2 from home-assistant-libs/addon-disable-boot-at-…
Browse files Browse the repository at this point in the history
…startup

Add boot_config and enum with new manual_only
  • Loading branch information
agners authored Aug 27, 2024
2 parents 3ab1add + 240bbba commit a190f27
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
2 changes: 2 additions & 0 deletions aiohasupervisor/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

from aiohasupervisor.models.addons import (
AddonBoot,
AddonBootConfig,
AddonsConfigValidate,
AddonsOptions,
AddonsSecurityOptions,
Expand Down Expand Up @@ -42,6 +43,7 @@
"AvailableUpdate",
"AddonStage",
"AddonBoot",
"AddonBootConfig",
"CpuArch",
"Capability",
"AppArmor",
Expand Down
9 changes: 9 additions & 0 deletions aiohasupervisor/models/addons.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,14 @@ class AddonStage(StrEnum):
DEPRECATED = "deprecated"


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

AUTO = "auto"
MANUAL = "manual"
MANUAL_ONLY = "manual_only"


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

Expand Down Expand Up @@ -197,6 +205,7 @@ class InstalledAddonComplete(
dns: list[str]
protected: bool
boot: AddonBoot
boot_config: AddonBootConfig
options: dict[str, Any]
schema: list[dict[str, Any]] | None
machine: list[str]
Expand Down
1 change: 1 addition & 0 deletions tests/fixtures/addons_info.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"protected": true,
"rating": 7,
"boot": "auto",
"boot_config": "auto",
"options": {
"authorized_keys": [],
"password": "",
Expand Down

0 comments on commit a190f27

Please sign in to comment.