fix integration descriptions (#81008)

This commit is contained in:
Bram Kragten 2022-10-26 12:39:23 +02:00 committed by GitHub
parent c59944bc84
commit 9ed31bb8df
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -264,7 +264,6 @@ async def async_get_integration_descriptions(
custom_integrations = await async_get_custom_components(hass) custom_integrations = await async_get_custom_components(hass)
custom_flows: dict[str, Any] = { custom_flows: dict[str, Any] = {
"integration": {}, "integration": {},
"hardware": {},
"helper": {}, "helper": {},
} }
@ -273,14 +272,14 @@ async def async_get_integration_descriptions(
if integration.integration_type in ("entity", "system"): if integration.integration_type in ("entity", "system"):
continue continue
for integration_type in ("integration", "hardware", "helper"): for integration_type in ("integration", "helper"):
if integration.domain not in core_flows[integration_type]: if integration.domain not in core_flows[integration_type]:
continue continue
del core_flows[integration_type][integration.domain] del core_flows[integration_type][integration.domain]
if integration.domain in core_flows["translated_name"]: if integration.domain in core_flows["translated_name"]:
core_flows["translated_name"].remove(integration.domain) core_flows["translated_name"].remove(integration.domain)
if integration.integration_type in ("hardware", "helper"): if integration.integration_type == "helper":
integration_key: str = integration.integration_type integration_key: str = integration.integration_type
else: else:
integration_key = "integration" integration_key = "integration"