Add Integration Quality Scale to manifest (#30547)
This commit is contained in:
parent
a4c830b5e4
commit
e18426051b
2 changed files with 13 additions and 0 deletions
|
@ -239,6 +239,11 @@ class Integration:
|
||||||
"""Return documentation."""
|
"""Return documentation."""
|
||||||
return cast(str, self.manifest.get("documentation"))
|
return cast(str, self.manifest.get("documentation"))
|
||||||
|
|
||||||
|
@property
|
||||||
|
def quality_scale(self) -> Optional[str]:
|
||||||
|
"""Return Integration Quality Scale."""
|
||||||
|
return cast(str, self.manifest.get("quality_scale"))
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def is_built_in(self) -> bool:
|
def is_built_in(self) -> bool:
|
||||||
"""Test if package is a built-in integration."""
|
"""Test if package is a built-in integration."""
|
||||||
|
|
|
@ -6,6 +6,13 @@ from voluptuous.humanize import humanize_error
|
||||||
|
|
||||||
from .model import Integration
|
from .model import Integration
|
||||||
|
|
||||||
|
SUPPORTED_QUALITY_SCALES = [
|
||||||
|
"gold",
|
||||||
|
"internal",
|
||||||
|
"platinum",
|
||||||
|
"silver",
|
||||||
|
]
|
||||||
|
|
||||||
MANIFEST_SCHEMA = vol.Schema(
|
MANIFEST_SCHEMA = vol.Schema(
|
||||||
{
|
{
|
||||||
vol.Required("domain"): str,
|
vol.Required("domain"): str,
|
||||||
|
@ -17,6 +24,7 @@ MANIFEST_SCHEMA = vol.Schema(
|
||||||
),
|
),
|
||||||
vol.Optional("homekit"): vol.Schema({vol.Optional("models"): [str]}),
|
vol.Optional("homekit"): vol.Schema({vol.Optional("models"): [str]}),
|
||||||
vol.Required("documentation"): str,
|
vol.Required("documentation"): str,
|
||||||
|
vol.Optional("quality_scale"): vol.In(SUPPORTED_QUALITY_SCALES),
|
||||||
vol.Required("requirements"): [str],
|
vol.Required("requirements"): [str],
|
||||||
vol.Required("dependencies"): [str],
|
vol.Required("dependencies"): [str],
|
||||||
vol.Optional("after_dependencies"): [str],
|
vol.Optional("after_dependencies"): [str],
|
||||||
|
|
Loading…
Add table
Reference in a new issue