mirror of
https://github.com/home-assistant/core.git
synced 2025-04-23 16:57:53 +00:00
Add Integration Quality Scale to manifest (#30547)
This commit is contained in:
parent
a4c830b5e4
commit
e18426051b
@ -239,6 +239,11 @@ class Integration:
|
||||
"""Return 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
|
||||
def is_built_in(self) -> bool:
|
||||
"""Test if package is a built-in integration."""
|
||||
|
@ -6,6 +6,13 @@ from voluptuous.humanize import humanize_error
|
||||
|
||||
from .model import Integration
|
||||
|
||||
SUPPORTED_QUALITY_SCALES = [
|
||||
"gold",
|
||||
"internal",
|
||||
"platinum",
|
||||
"silver",
|
||||
]
|
||||
|
||||
MANIFEST_SCHEMA = vol.Schema(
|
||||
{
|
||||
vol.Required("domain"): str,
|
||||
@ -17,6 +24,7 @@ MANIFEST_SCHEMA = vol.Schema(
|
||||
),
|
||||
vol.Optional("homekit"): vol.Schema({vol.Optional("models"): [str]}),
|
||||
vol.Required("documentation"): str,
|
||||
vol.Optional("quality_scale"): vol.In(SUPPORTED_QUALITY_SCALES),
|
||||
vol.Required("requirements"): [str],
|
||||
vol.Required("dependencies"): [str],
|
||||
vol.Optional("after_dependencies"): [str],
|
||||
|
Loading…
x
Reference in New Issue
Block a user