Remove silver integrations from NO_DIAGNOSTICS (#117840)

This commit is contained in:
epenet 2024-05-21 10:01:13 +02:00 committed by GitHub
parent d5e0ffc4d8
commit 54d048fb11
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -124,12 +124,10 @@ NO_DIAGNOSTICS = [
"hyperion",
"modbus",
"nightscout",
"point",
"pvpc_hourly_pricing",
"risco",
"smarttub",
"songpal",
"tellduslive",
"vizio",
"yeelight",
]
@ -385,12 +383,19 @@ def validate_manifest(integration: Integration, core_components_dir: Path) -> No
f"{quality_scale} integration does not implement diagnostics",
)
if domain in NO_DIAGNOSTICS and (integration.path / "diagnostics.py").exists():
integration.add_error(
"manifest",
"Implements diagnostics and can be "
"removed from NO_DIAGNOSTICS in script/hassfest/manifest.py",
)
if domain in NO_DIAGNOSTICS:
if quality_scale and QualityScale[quality_scale.upper()] < QualityScale.GOLD:
integration.add_error(
"manifest",
"{quality_scale} integration should be "
"removed from NO_DIAGNOSTICS in script/hassfest/manifest.py",
)
elif (integration.path / "diagnostics.py").exists():
integration.add_error(
"manifest",
"Implements diagnostics and can be "
"removed from NO_DIAGNOSTICS in script/hassfest/manifest.py",
)
if not integration.core:
validate_version(integration)