async_config_entry_first_refresh in update coordinator requires a config entry (#154114)

This commit is contained in:
G Johansson
2025-10-13 19:47:07 +02:00
committed by GitHub
parent 01dee6507b
commit 0bfdd70730
2 changed files with 7 additions and 9 deletions

View File

@@ -300,12 +300,11 @@ class DataUpdateCoordinator(BaseDataUpdateCoordinatorProtocol, Generic[_DataT]):
to ensure that multiple retries do not cause log spam.
"""
if self.config_entry is None:
report_usage(
"uses `async_config_entry_first_refresh`, which is only supported "
"for coordinators with a config entry",
breaks_in_ha_version="2025.11",
raise ConfigEntryError(
"Detected code that uses `async_config_entry_first_refresh`,"
" which is only supported for coordinators with a config entry"
)
elif (
if (
self.config_entry.state
is not config_entries.ConfigEntryState.SETUP_IN_PROGRESS
):