mirror of
https://github.com/home-assistant/core.git
synced 2025-04-25 17:57:55 +00:00
Add additional integration_type options for integration manifests (#79193)
* Add additional integration_type options for integration manifests * Rename integration_type internal to system
This commit is contained in:
parent
84b2c74746
commit
cce23683f1
@ -3,5 +3,6 @@
|
|||||||
"name": "Air Quality",
|
"name": "Air Quality",
|
||||||
"documentation": "https://www.home-assistant.io/integrations/air_quality",
|
"documentation": "https://www.home-assistant.io/integrations/air_quality",
|
||||||
"codeowners": ["@home-assistant/core"],
|
"codeowners": ["@home-assistant/core"],
|
||||||
"quality_scale": "internal"
|
"quality_scale": "internal",
|
||||||
|
"integration_type": "entity"
|
||||||
}
|
}
|
||||||
|
@ -6,5 +6,6 @@
|
|||||||
"dependencies": ["api", "websocket_api"],
|
"dependencies": ["api", "websocket_api"],
|
||||||
"after_dependencies": ["energy"],
|
"after_dependencies": ["energy"],
|
||||||
"quality_scale": "internal",
|
"quality_scale": "internal",
|
||||||
"iot_class": "cloud_push"
|
"iot_class": "cloud_push",
|
||||||
|
"integration_type": "system"
|
||||||
}
|
}
|
||||||
|
@ -129,7 +129,7 @@ class Manifest(TypedDict, total=False):
|
|||||||
name: str
|
name: str
|
||||||
disabled: str
|
disabled: str
|
||||||
domain: str
|
domain: str
|
||||||
integration_type: Literal["integration", "hardware", "helper"]
|
integration_type: Literal["entity", "integration", "hardware", "helper", "system"]
|
||||||
dependencies: list[str]
|
dependencies: list[str]
|
||||||
after_dependencies: list[str]
|
after_dependencies: list[str]
|
||||||
requirements: list[str]
|
requirements: list[str]
|
||||||
@ -558,7 +558,9 @@ class Integration:
|
|||||||
return self.manifest.get("iot_class")
|
return self.manifest.get("iot_class")
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def integration_type(self) -> Literal["integration", "hardware", "helper"]:
|
def integration_type(
|
||||||
|
self,
|
||||||
|
) -> Literal["entity", "integration", "hardware", "helper", "system"]:
|
||||||
"""Return the integration type."""
|
"""Return the integration type."""
|
||||||
return self.manifest.get("integration_type", "integration")
|
return self.manifest.get("integration_type", "integration")
|
||||||
|
|
||||||
|
@ -162,7 +162,9 @@ MANIFEST_SCHEMA = vol.Schema(
|
|||||||
{
|
{
|
||||||
vol.Required("domain"): str,
|
vol.Required("domain"): str,
|
||||||
vol.Required("name"): 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("config_flow"): bool,
|
||||||
vol.Optional("mqtt"): [str],
|
vol.Optional("mqtt"): [str],
|
||||||
vol.Optional("zeroconf"): [
|
vol.Optional("zeroconf"): [
|
||||||
|
Loading…
x
Reference in New Issue
Block a user