Skip to content

Commit

Permalink
Merge pull request #134 from golles/122-knmi-sets-version-directly-to…
Browse files Browse the repository at this point in the history
…-update-a-config-entry

Update a config entry with `async_update_entry`
  • Loading branch information
golles authored Mar 17, 2024
2 parents f3f8130 + 1c1e3d2 commit 8811bd2
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions custom_components/knmi/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,7 @@ async def async_migrate_entry(hass: HomeAssistant, config_entry: ConfigEntry) ->
_LOGGER.debug("Migrating from version %s", config_entry.version)

if config_entry.version == 1:
# Replace with the following line after 2024.3.
# hass.config_entries.async_update_entry(config_entry, version=2)
# See https://developers.home-assistant.io/blog/2024/02/12/async_update_entry/
config_entry.version = 2
hass.config_entries.async_update_entry(config_entry, version=2)

entity_registry = er.async_get(hass)
existing_entries = er.async_entries_for_config_entry(
Expand Down

0 comments on commit 8811bd2

Please sign in to comment.