Skip to content

fix(coordinator): pass config_entry to DataUpdateCoordinator on HA 2026.x+#268

Open
sslivins wants to merge 1 commit intobinarydev:mainfrom
sslivins:pr1-coordinator-config-entry
Open

fix(coordinator): pass config_entry to DataUpdateCoordinator on HA 2026.x+#268
sslivins wants to merge 1 commit intobinarydev:mainfrom
sslivins:pr1-coordinator-config-entry

Conversation

@sslivins
Copy link
Copy Markdown

Small standalone fix - one of a few followups I'm sending alongside #267.

Newer Home Assistant versions require config_entry to be set on DataUpdateCoordinator so async_config_entry_first_refresh can resolve the entry. Without it, reloading after an options change throws:

ConfigEntryError: Detected code that uses async_config_entry_first_refresh,
which is only supported for coordinators with a config entry

Fix is one line in the super().__init__ call to pass config_entry=config_entry.

Independent of the OAuth work - just spotted while testing options-flow reload locally on HA 2026.x.

Take it or leave it, no worries either way.

…__init__

Newer Home Assistant versions require config_entry to be set on the
coordinator so async_config_entry_first_refresh can resolve the entry.
Without it, reload after options change raised:

  ConfigEntryError: Detected code that uses
  async_config_entry_first_refresh, which is only supported for
  coordinators with a config entry

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant