Add SOURCE_SYSTEM to DISCOVERY_SOURCES (#128457)
This commit is contained in:
parent
1ff1b82fc7
commit
8ae8fa7ec9
2 changed files with 2 additions and 4 deletions
|
@ -175,6 +175,7 @@ DISCOVERY_SOURCES = {
|
|||
SOURCE_INTEGRATION_DISCOVERY,
|
||||
SOURCE_MQTT,
|
||||
SOURCE_SSDP,
|
||||
SOURCE_SYSTEM,
|
||||
SOURCE_USB,
|
||||
SOURCE_ZEROCONF,
|
||||
}
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Add table
Reference in a new issue