Update device registry code sample (#1029)

`async_get_registry` is legacy.
This commit is contained in:
epenet 2021-08-18 12:25:47 +02:00 committed by GitHub
parent 92b2bc0932
commit 67c9ffc6be
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -74,7 +74,7 @@ Components are also able to register devices in the case that there are no entit
# Inside a component
from homeassistant.helpers import device_registry as dr
device_registry = await dr.async_get_registry(hass)
device_registry = dr.async_get(hass)
device_registry.async_get_or_create(
config_entry_id=entry.entry_id,