Skip to content

Commit

Permalink
async_get_registry renamed to async_get.
Browse files Browse the repository at this point in the history
This rename happened a year ago, but since it is only in the config_flow,
the deprecation warning was not triggered in normal usage.

Now the deprecated function alias has been removed it is an error on import,
which stops the integration from working.

It seems the replacement function may have been introduced in 2021.2,
but the deprecation warning was only added in 2022.6, so require that
version to be safe (it is already very old).
  • Loading branch information
make-all committed May 5, 2023
1 parent def6638 commit b42763e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions custom_components/metlink/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
import homeassistant.helpers.config_validation as cv
from homeassistant.helpers.entity_registry import (
async_entries_for_config_entry,
async_get_registry,
async_get,
)
import voluptuous as vol

Expand Down Expand Up @@ -141,7 +141,7 @@ async def async_step_init(
self, user_input: Dict[str, Any] = None
) -> Dict[str, Any]:
"""Manage the options for the component."""
entity_registry = await async_get_registry(self.hass)
entity_registry = await async_get(self.hass)
entries = async_entries_for_config_entry(
entity_registry, self.config_entry.entry_id
)
Expand Down
2 changes: 1 addition & 1 deletion custom_components/metlink/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@
"iot_class": "cloud_polling",
"issue_tracker": "https://github.com/make-all/metlink-nz/issues",
"requirements": ["isodate~=0.6.1"],
"version": "1.0.6"
"version": "1.0.8"
}
2 changes: 1 addition & 1 deletion hacs.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
"name": "Metlink Wellington Transport",
"render_readme": true,
"country": "NZ",
"homeassistant": "2022.3.0"
"homeassistant": "2022.6.0"
}

0 comments on commit b42763e

Please sign in to comment.