mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 13:17:32 +00:00
Ensure gold and platinum integrations implement diagnostic (#117565)
This commit is contained in:
parent
0335a01fba
commit
996132f3f8
@ -113,6 +113,27 @@ NO_IOT_CLASS = [
|
|||||||
"websocket_api",
|
"websocket_api",
|
||||||
"zone",
|
"zone",
|
||||||
]
|
]
|
||||||
|
# Grandfather rule for older integrations
|
||||||
|
# https://github.com/home-assistant/developers.home-assistant/pull/1512
|
||||||
|
NO_DIAGNOSTICS = [
|
||||||
|
"dlna_dms",
|
||||||
|
"fronius",
|
||||||
|
"gdacs",
|
||||||
|
"geonetnz_quakes",
|
||||||
|
"google_assistant_sdk",
|
||||||
|
"hyperion",
|
||||||
|
"modbus",
|
||||||
|
"nightscout",
|
||||||
|
"nws",
|
||||||
|
"point",
|
||||||
|
"pvpc_hourly_pricing",
|
||||||
|
"risco",
|
||||||
|
"smarttub",
|
||||||
|
"songpal",
|
||||||
|
"tellduslive",
|
||||||
|
"vizio",
|
||||||
|
"yeelight",
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
def documentation_url(value: str) -> str:
|
def documentation_url(value: str) -> str:
|
||||||
@ -348,14 +369,28 @@ def validate_manifest(integration: Integration, core_components_dir: Path) -> No
|
|||||||
"Virtual integration points to non-existing supported_by integration",
|
"Virtual integration points to non-existing supported_by integration",
|
||||||
)
|
)
|
||||||
|
|
||||||
if (
|
if (quality_scale := integration.manifest.get("quality_scale")) and QualityScale[
|
||||||
(quality_scale := integration.manifest.get("quality_scale"))
|
quality_scale.upper()
|
||||||
and QualityScale[quality_scale.upper()] > QualityScale.SILVER
|
] > QualityScale.SILVER:
|
||||||
and not integration.manifest.get("codeowners")
|
if not integration.manifest.get("codeowners"):
|
||||||
):
|
integration.add_error(
|
||||||
|
"manifest",
|
||||||
|
f"{quality_scale} integration does not have a code owner",
|
||||||
|
)
|
||||||
|
if (
|
||||||
|
domain not in NO_DIAGNOSTICS
|
||||||
|
and not (integration.path / "diagnostics.py").exists()
|
||||||
|
):
|
||||||
|
integration.add_error(
|
||||||
|
"manifest",
|
||||||
|
f"{quality_scale} integration does not implement diagnostics",
|
||||||
|
)
|
||||||
|
|
||||||
|
if domain in NO_DIAGNOSTICS and (integration.path / "diagnostics.py").exists():
|
||||||
integration.add_error(
|
integration.add_error(
|
||||||
"manifest",
|
"manifest",
|
||||||
f"{quality_scale} integration does not have a code owner",
|
"Implements diagnostics and can be "
|
||||||
|
"removed from NO_DIAGNOSTICS in script/hassfest/manifest.py",
|
||||||
)
|
)
|
||||||
|
|
||||||
if not integration.core:
|
if not integration.core:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user