Add SOURCE_SYSTEM to DISCOVERY_SOURCES (#128457)

This commit is contained in:
epenet 2024-10-16 11:27:48 +02:00 committed by GitHub
parent 1ff1b82fc7
commit 8ae8fa7ec9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 4 deletions

View file

@ -175,6 +175,7 @@ DISCOVERY_SOURCES = {
SOURCE_INTEGRATION_DISCOVERY,
SOURCE_MQTT,
SOURCE_SSDP,
SOURCE_SYSTEM,
SOURCE_USB,
SOURCE_ZEROCONF,
}

View file

@ -13,7 +13,6 @@ import pytest
from homeassistant.config_entries import (
DISCOVERY_SOURCES,
SOURCE_SYSTEM,
ConfigEntriesFlowManager,
FlowResult,
)
@ -540,9 +539,7 @@ def check_config_translations(ignore_translations: str | list[str]) -> Generator
if result["type"] is FlowResultType.ABORT:
# We don't need translations for a discovery flow which immediately
# aborts, since such flows won't be seen by users
if not flow.__flow_seen_before and (
flow.source == SOURCE_SYSTEM or flow.source in DISCOVERY_SOURCES
):
if not flow.__flow_seen_before and flow.source in DISCOVERY_SOURCES:
return result
await _ensure_translation_exists(
flow.hass,