Skip to content

Commit

Permalink
fix: replace deprecated async_get_registry while entry setup by async…
Browse files Browse the repository at this point in the history
…_get

async_get_registry for entity_registry is just wrapper for async_get, so we may use it directly.

Fix #43
  • Loading branch information
IATkachenko committed May 25, 2022
1 parent acdcdee commit ecaed5d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion custom_components/sleep_as_android/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ async def async_setup_entry(hass: HomeAssistant, config_entry: ConfigEntry):
if DOMAIN not in hass.data:
hass.data[DOMAIN] = {}

registry = await er.async_get_registry(hass)
registry = er.async_get(hass)
hass.data[DOMAIN][config_entry.entry_id] = SleepAsAndroidInstance(
hass, config_entry, registry
)
Expand Down

0 comments on commit ecaed5d

Please sign in to comment.