diff --git a/homeassistant/loader.py b/homeassistant/loader.py index a14a5209840..7a15410f96a 100644 --- a/homeassistant/loader.py +++ b/homeassistant/loader.py @@ -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.""" diff --git a/script/hassfest/manifest.py b/script/hassfest/manifest.py index acc5e9af832..e6bd6551786 100644 --- a/script/hassfest/manifest.py +++ b/script/hassfest/manifest.py @@ -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],