Add missing manifest object to the check (#37535)

This commit is contained in:
Joakim Sørensen 2020-07-06 11:21:40 +02:00 committed by GitHub
parent 711b8e10a3
commit 0fb73a6332
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 4 deletions

View File

@ -23,22 +23,22 @@ def validate_integration(config: Config, integration: Integration):
config_flow_file = integration.path / "config_flow.py"
if not config_flow_file.is_file():
if integration.get("config_flow"):
if integration.manifest.get("config_flow"):
integration.add_error(
"config_flow",
"Config flows need to be defined in the file config_flow.py",
)
if integration.get("homekit"):
if integration.manifest.get("homekit"):
integration.add_error(
"config_flow",
"HomeKit information in a manifest requires a config flow to exist",
)
if integration.get("ssdp"):
if integration.manifest.get("ssdp"):
integration.add_error(
"config_flow",
"SSDP information in a manifest requires a config flow to exist",
)
if integration.get("zeroconf"):
if integration.manifest.get("zeroconf"):
integration.add_error(
"config_flow",
"Zeroconf information in a manifest requires a config flow to exist",