Add additional integration_type options for integration manifests (#79193)

* Add additional integration_type options for integration manifests

* Rename integration_type internal to system
pull/79202/head
Erik Montnemery 2022-09-28 14:17:39 +02:00 committed by GitHub
parent 84b2c74746
commit cce23683f1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 11 additions and 5 deletions

View File

@ -3,5 +3,6 @@
"name": "Air Quality",
"documentation": "https://www.home-assistant.io/integrations/air_quality",
"codeowners": ["@home-assistant/core"],
"quality_scale": "internal"
"quality_scale": "internal",
"integration_type": "entity"
}

View File

@ -6,5 +6,6 @@
"dependencies": ["api", "websocket_api"],
"after_dependencies": ["energy"],
"quality_scale": "internal",
"iot_class": "cloud_push"
"iot_class": "cloud_push",
"integration_type": "system"
}

View File

@ -129,7 +129,7 @@ class Manifest(TypedDict, total=False):
name: str
disabled: str
domain: str
integration_type: Literal["integration", "hardware", "helper"]
integration_type: Literal["entity", "integration", "hardware", "helper", "system"]
dependencies: list[str]
after_dependencies: list[str]
requirements: list[str]
@ -558,7 +558,9 @@ class Integration:
return self.manifest.get("iot_class")
@property
def integration_type(self) -> Literal["integration", "hardware", "helper"]:
def integration_type(
self,
) -> Literal["entity", "integration", "hardware", "helper", "system"]:
"""Return the integration type."""
return self.manifest.get("integration_type", "integration")

View File

@ -162,7 +162,9 @@ MANIFEST_SCHEMA = vol.Schema(
{
vol.Required("domain"): str,
vol.Required("name"): str,
vol.Optional("integration_type"): vol.In(["hardware", "helper"]),
vol.Optional("integration_type"): vol.In(
["entity", "hardware", "helper", "system"]
),
vol.Optional("config_flow"): bool,
vol.Optional("mqtt"): [str],
vol.Optional("zeroconf"): [