From b42763e53eff8c4a1d59e565d405e7dd25436793 Mon Sep 17 00:00:00 2001 From: Jason Rumney Date: Fri, 5 May 2023 10:50:22 +0900 Subject: [PATCH] async_get_registry renamed to async_get. 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). --- custom_components/metlink/config_flow.py | 4 ++-- custom_components/metlink/manifest.json | 2 +- hacs.json | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/custom_components/metlink/config_flow.py b/custom_components/metlink/config_flow.py index 358b497..7070f20 100644 --- a/custom_components/metlink/config_flow.py +++ b/custom_components/metlink/config_flow.py @@ -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 @@ -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 ) diff --git a/custom_components/metlink/manifest.json b/custom_components/metlink/manifest.json index 9ea237e..8ab4cfc 100644 --- a/custom_components/metlink/manifest.json +++ b/custom_components/metlink/manifest.json @@ -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" } diff --git a/hacs.json b/hacs.json index 1e25e75..2a27984 100644 --- a/hacs.json +++ b/hacs.json @@ -2,5 +2,5 @@ "name": "Metlink Wellington Transport", "render_readme": true, "country": "NZ", - "homeassistant": "2022.3.0" + "homeassistant": "2022.6.0" }