diff --git a/homeassistant/components/alarm_control_panel/device_action.py b/homeassistant/components/alarm_control_panel/device_action.py index 2680b033b03..ff14b851df8 100644 --- a/homeassistant/components/alarm_control_panel/device_action.py +++ b/homeassistant/components/alarm_control_panel/device_action.py @@ -57,7 +57,7 @@ async def async_get_actions( hass: HomeAssistant, device_id: str ) -> list[dict[str, str]]: """List device actions for Alarm control panel devices.""" - registry = await entity_registry.async_get_registry(hass) + registry = entity_registry.async_get(hass) actions = [] # Get all the integrations entities for this device diff --git a/homeassistant/components/alarm_control_panel/device_condition.py b/homeassistant/components/alarm_control_panel/device_condition.py index a378cf262ed..4764d5cfcbe 100644 --- a/homeassistant/components/alarm_control_panel/device_condition.py +++ b/homeassistant/components/alarm_control_panel/device_condition.py @@ -64,7 +64,7 @@ async def async_get_conditions( hass: HomeAssistant, device_id: str ) -> list[dict[str, str]]: """List device conditions for Alarm control panel devices.""" - registry = await entity_registry.async_get_registry(hass) + registry = entity_registry.async_get(hass) conditions = [] # Get all the integrations entities for this device diff --git a/homeassistant/components/alarm_control_panel/device_trigger.py b/homeassistant/components/alarm_control_panel/device_trigger.py index ce53596fc8d..18508661034 100644 --- a/homeassistant/components/alarm_control_panel/device_trigger.py +++ b/homeassistant/components/alarm_control_panel/device_trigger.py @@ -60,7 +60,7 @@ async def async_get_triggers( hass: HomeAssistant, device_id: str ) -> list[dict[str, Any]]: """List device triggers for Alarm control panel devices.""" - registry = await entity_registry.async_get_registry(hass) + registry = entity_registry.async_get(hass) triggers: list[dict[str, str]] = [] # Get all the integrations entities for this device diff --git a/homeassistant/components/arcam_fmj/device_trigger.py b/homeassistant/components/arcam_fmj/device_trigger.py index 2b1a3bf3a19..d1fca811fcc 100644 --- a/homeassistant/components/arcam_fmj/device_trigger.py +++ b/homeassistant/components/arcam_fmj/device_trigger.py @@ -37,7 +37,7 @@ async def async_get_triggers( hass: HomeAssistant, device_id: str ) -> list[dict[str, Any]]: """List device triggers for Arcam FMJ Receiver control devices.""" - registry = await entity_registry.async_get_registry(hass) + registry = entity_registry.async_get(hass) triggers = [] # Get all the integrations entities for this device diff --git a/homeassistant/components/climate/device_action.py b/homeassistant/components/climate/device_action.py index 81189417c2b..45160eed8eb 100644 --- a/homeassistant/components/climate/device_action.py +++ b/homeassistant/components/climate/device_action.py @@ -43,7 +43,7 @@ async def async_get_actions( hass: HomeAssistant, device_id: str ) -> list[dict[str, str]]: """List device actions for Climate devices.""" - registry = await entity_registry.async_get_registry(hass) + registry = entity_registry.async_get(hass) actions = [] # Get all the integrations entities for this device diff --git a/homeassistant/components/climate/device_condition.py b/homeassistant/components/climate/device_condition.py index dd5842cd2a8..56bac123d28 100644 --- a/homeassistant/components/climate/device_condition.py +++ b/homeassistant/components/climate/device_condition.py @@ -45,7 +45,7 @@ async def async_get_conditions( hass: HomeAssistant, device_id: str ) -> list[dict[str, str]]: """List device conditions for Climate devices.""" - registry = await entity_registry.async_get_registry(hass) + registry = entity_registry.async_get(hass) conditions = [] # Get all the integrations entities for this device diff --git a/homeassistant/components/climate/device_trigger.py b/homeassistant/components/climate/device_trigger.py index 6bd6f4c3e02..e40cf32f2a9 100644 --- a/homeassistant/components/climate/device_trigger.py +++ b/homeassistant/components/climate/device_trigger.py @@ -67,7 +67,7 @@ async def async_get_triggers( hass: HomeAssistant, device_id: str ) -> list[dict[str, Any]]: """List device triggers for Climate devices.""" - registry = await entity_registry.async_get_registry(hass) + registry = entity_registry.async_get(hass) triggers = [] # Get all the integrations entities for this device diff --git a/homeassistant/components/cover/device_action.py b/homeassistant/components/cover/device_action.py index debb2368cf2..9bdf21f168e 100644 --- a/homeassistant/components/cover/device_action.py +++ b/homeassistant/components/cover/device_action.py @@ -63,7 +63,7 @@ async def async_get_actions( hass: HomeAssistant, device_id: str ) -> list[dict[str, str]]: """List device actions for Cover devices.""" - registry = await entity_registry.async_get_registry(hass) + registry = entity_registry.async_get(hass) actions = [] # Get all the integrations entities for this device diff --git a/homeassistant/components/cover/device_condition.py b/homeassistant/components/cover/device_condition.py index cca608187a2..bb66d54b79b 100644 --- a/homeassistant/components/cover/device_condition.py +++ b/homeassistant/components/cover/device_condition.py @@ -66,7 +66,7 @@ async def async_get_conditions( hass: HomeAssistant, device_id: str ) -> list[dict[str, str]]: """List device conditions for Cover devices.""" - registry = await entity_registry.async_get_registry(hass) + registry = entity_registry.async_get(hass) conditions: list[dict[str, str]] = [] # Get all the integrations entities for this device diff --git a/homeassistant/components/cover/device_trigger.py b/homeassistant/components/cover/device_trigger.py index f960fcdcce6..f7b2f54f4dd 100644 --- a/homeassistant/components/cover/device_trigger.py +++ b/homeassistant/components/cover/device_trigger.py @@ -76,7 +76,7 @@ async def async_get_triggers( hass: HomeAssistant, device_id: str ) -> list[dict[str, Any]]: """List device triggers for Cover devices.""" - registry = await entity_registry.async_get_registry(hass) + registry = entity_registry.async_get(hass) triggers = [] # Get all the integrations entities for this device diff --git a/homeassistant/components/device_tracker/device_condition.py b/homeassistant/components/device_tracker/device_condition.py index 0703d3c7646..1a6adabda63 100644 --- a/homeassistant/components/device_tracker/device_condition.py +++ b/homeassistant/components/device_tracker/device_condition.py @@ -33,7 +33,7 @@ async def async_get_conditions( hass: HomeAssistant, device_id: str ) -> list[dict[str, str]]: """List device conditions for Device tracker devices.""" - registry = await entity_registry.async_get_registry(hass) + registry = entity_registry.async_get(hass) conditions = [] # Get all the integrations entities for this device diff --git a/homeassistant/components/device_tracker/device_trigger.py b/homeassistant/components/device_tracker/device_trigger.py index 4350f03cefc..134e9d8dca3 100644 --- a/homeassistant/components/device_tracker/device_trigger.py +++ b/homeassistant/components/device_tracker/device_trigger.py @@ -41,7 +41,7 @@ async def async_get_triggers( hass: HomeAssistant, device_id: str ) -> list[dict[str, Any]]: """List device triggers for Device Tracker devices.""" - registry = await entity_registry.async_get_registry(hass) + registry = entity_registry.async_get(hass) triggers = [] # Get all the integrations entities for this device diff --git a/homeassistant/components/fan/device_condition.py b/homeassistant/components/fan/device_condition.py index b0882137d7f..7e27ea29f98 100644 --- a/homeassistant/components/fan/device_condition.py +++ b/homeassistant/components/fan/device_condition.py @@ -34,7 +34,7 @@ async def async_get_conditions( hass: HomeAssistant, device_id: str ) -> list[dict[str, str]]: """List device conditions for Fan devices.""" - registry = await entity_registry.async_get_registry(hass) + registry = entity_registry.async_get(hass) conditions = [] # Get all the integrations entities for this device diff --git a/homeassistant/components/geofency/device_tracker.py b/homeassistant/components/geofency/device_tracker.py index c92b2905be2..bd4b2852019 100644 --- a/homeassistant/components/geofency/device_tracker.py +++ b/homeassistant/components/geofency/device_tracker.py @@ -35,7 +35,7 @@ async def async_setup_entry( ] = async_dispatcher_connect(hass, TRACKER_UPDATE, _receive_data) # Restore previously loaded devices - dev_reg = await device_registry.async_get_registry(hass) + dev_reg = device_registry.async_get(hass) dev_ids = { identifier[1] for device in dev_reg.devices.values() diff --git a/homeassistant/components/gpslogger/device_tracker.py b/homeassistant/components/gpslogger/device_tracker.py index fb0e1385fba..ea648ed7495 100644 --- a/homeassistant/components/gpslogger/device_tracker.py +++ b/homeassistant/components/gpslogger/device_tracker.py @@ -45,7 +45,7 @@ async def async_setup_entry( ] = async_dispatcher_connect(hass, TRACKER_UPDATE, _receive_data) # Restore previously loaded devices - dev_reg = await device_registry.async_get_registry(hass) + dev_reg = device_registry.async_get(hass) dev_ids = { identifier[1] for device in dev_reg.devices.values() diff --git a/homeassistant/components/huawei_lte/device_tracker.py b/homeassistant/components/huawei_lte/device_tracker.py index c8e9a5d7a0d..ee643c59b12 100644 --- a/homeassistant/components/huawei_lte/device_tracker.py +++ b/homeassistant/components/huawei_lte/device_tracker.py @@ -66,7 +66,7 @@ async def async_setup_entry( # Initialize already tracked entities tracked: set[str] = set() - registry = await entity_registry.async_get_registry(hass) + registry = entity_registry.async_get(hass) known_entities: list[Entity] = [] track_wired_clients = router.config_entry.options.get( CONF_TRACK_WIRED_CLIENTS, DEFAULT_TRACK_WIRED_CLIENTS diff --git a/homeassistant/components/humidifier/device_action.py b/homeassistant/components/humidifier/device_action.py index db51ab34baa..03f0bb1fea1 100644 --- a/homeassistant/components/humidifier/device_action.py +++ b/homeassistant/components/humidifier/device_action.py @@ -49,7 +49,7 @@ async def async_get_actions( hass: HomeAssistant, device_id: str ) -> list[dict[str, str]]: """List device actions for Humidifier devices.""" - registry = await entity_registry.async_get_registry(hass) + registry = entity_registry.async_get(hass) actions = await toggle_entity.async_get_actions(hass, device_id, DOMAIN) # Get all the integrations entities for this device diff --git a/homeassistant/components/humidifier/device_condition.py b/homeassistant/components/humidifier/device_condition.py index c58c247d569..b8e8d2a13ae 100644 --- a/homeassistant/components/humidifier/device_condition.py +++ b/homeassistant/components/humidifier/device_condition.py @@ -41,7 +41,7 @@ async def async_get_conditions( hass: HomeAssistant, device_id: str ) -> list[dict[str, str]]: """List device conditions for Humidifier devices.""" - registry = await entity_registry.async_get_registry(hass) + registry = entity_registry.async_get(hass) conditions = await toggle_entity.async_get_conditions(hass, device_id, DOMAIN) # Get all the integrations entities for this device diff --git a/homeassistant/components/humidifier/device_trigger.py b/homeassistant/components/humidifier/device_trigger.py index e4b0440e869..a2d15097335 100644 --- a/homeassistant/components/humidifier/device_trigger.py +++ b/homeassistant/components/humidifier/device_trigger.py @@ -61,7 +61,7 @@ async def async_get_triggers( hass: HomeAssistant, device_id: str ) -> list[dict[str, Any]]: """List device triggers for Humidifier devices.""" - registry = await entity_registry.async_get_registry(hass) + registry = entity_registry.async_get(hass) triggers = await toggle_entity.async_get_triggers(hass, device_id, DOMAIN) # Get all the integrations entities for this device diff --git a/homeassistant/components/keenetic_ndms2/device_tracker.py b/homeassistant/components/keenetic_ndms2/device_tracker.py index 5a92d04e498..b625cabbbc1 100644 --- a/homeassistant/components/keenetic_ndms2/device_tracker.py +++ b/homeassistant/components/keenetic_ndms2/device_tracker.py @@ -40,7 +40,7 @@ async def async_setup_entry( update_from_router() - registry = await entity_registry.async_get_registry(hass) + registry = entity_registry.async_get(hass) # Restore devices that are not a part of active clients list. restored = [] for entity_entry in registry.entities.values(): diff --git a/homeassistant/components/kodi/device_trigger.py b/homeassistant/components/kodi/device_trigger.py index 68735bfa386..e4fe6cfa103 100644 --- a/homeassistant/components/kodi/device_trigger.py +++ b/homeassistant/components/kodi/device_trigger.py @@ -38,7 +38,7 @@ async def async_get_triggers( hass: HomeAssistant, device_id: str ) -> list[dict[str, Any]]: """List device triggers for Kodi devices.""" - registry = await entity_registry.async_get_registry(hass) + registry = entity_registry.async_get(hass) triggers = [] # Get all the integrations entities for this device diff --git a/homeassistant/components/kodi/media_player.py b/homeassistant/components/kodi/media_player.py index 66bb582e6e0..cea3adcde00 100644 --- a/homeassistant/components/kodi/media_player.py +++ b/homeassistant/components/kodi/media_player.py @@ -426,7 +426,7 @@ class KodiEntity(MediaPlayerEntity): version = (await self._kodi.get_application_properties(["version"]))["version"] sw_version = f"{version['major']}.{version['minor']}" - dev_reg = await device_registry.async_get_registry(self.hass) + dev_reg = device_registry.async_get(self.hass) device = dev_reg.async_get_device({(DOMAIN, self.unique_id)}) dev_reg.async_update_device(device.id, sw_version=sw_version) diff --git a/homeassistant/components/lock/device_action.py b/homeassistant/components/lock/device_action.py index 092aff8878d..038c2f1c0da 100644 --- a/homeassistant/components/lock/device_action.py +++ b/homeassistant/components/lock/device_action.py @@ -34,7 +34,7 @@ async def async_get_actions( hass: HomeAssistant, device_id: str ) -> list[dict[str, str]]: """List device actions for Lock devices.""" - registry = await entity_registry.async_get_registry(hass) + registry = entity_registry.async_get(hass) actions = [] # Get all the integrations entities for this device diff --git a/homeassistant/components/lock/device_condition.py b/homeassistant/components/lock/device_condition.py index a818a2b5fa4..cdaa02de618 100644 --- a/homeassistant/components/lock/device_condition.py +++ b/homeassistant/components/lock/device_condition.py @@ -45,7 +45,7 @@ async def async_get_conditions( hass: HomeAssistant, device_id: str ) -> list[dict[str, str]]: """List device conditions for Lock devices.""" - registry = await entity_registry.async_get_registry(hass) + registry = entity_registry.async_get(hass) conditions = [] # Get all the integrations entities for this device diff --git a/homeassistant/components/lock/device_trigger.py b/homeassistant/components/lock/device_trigger.py index 75415bbf3e1..d875cadb446 100644 --- a/homeassistant/components/lock/device_trigger.py +++ b/homeassistant/components/lock/device_trigger.py @@ -45,7 +45,7 @@ async def async_get_triggers( hass: HomeAssistant, device_id: str ) -> list[dict[str, Any]]: """List device triggers for Lock devices.""" - registry = await entity_registry.async_get_registry(hass) + registry = entity_registry.async_get(hass) triggers = [] # Get all the integrations entities for this device diff --git a/homeassistant/components/media_player/device_condition.py b/homeassistant/components/media_player/device_condition.py index 5f57bcea48e..2f398790ac3 100644 --- a/homeassistant/components/media_player/device_condition.py +++ b/homeassistant/components/media_player/device_condition.py @@ -45,7 +45,7 @@ async def async_get_conditions( hass: HomeAssistant, device_id: str ) -> list[dict[str, str]]: """List device conditions for Media player devices.""" - registry = await entity_registry.async_get_registry(hass) + registry = entity_registry.async_get(hass) conditions = [] # Get all the integrations entities for this device diff --git a/homeassistant/components/media_player/device_trigger.py b/homeassistant/components/media_player/device_trigger.py index aeed2fd646a..9644e5e0010 100644 --- a/homeassistant/components/media_player/device_trigger.py +++ b/homeassistant/components/media_player/device_trigger.py @@ -57,7 +57,7 @@ async def async_get_triggers( hass: HomeAssistant, device_id: str ) -> list[dict[str, Any]]: """List device triggers for Media player entities.""" - registry = await entity_registry.async_get_registry(hass) + registry = entity_registry.async_get(hass) triggers = await entity.async_get_triggers(hass, device_id, DOMAIN) # Get all the integration entities for this device diff --git a/homeassistant/components/mikrotik/device_tracker.py b/homeassistant/components/mikrotik/device_tracker.py index 166415caf39..dee4a5de08d 100644 --- a/homeassistant/components/mikrotik/device_tracker.py +++ b/homeassistant/components/mikrotik/device_tracker.py @@ -34,7 +34,7 @@ async def async_setup_entry( tracked: dict[str, MikrotikHubTracker] = {} - registry = await entity_registry.async_get_registry(hass) + registry = entity_registry.async_get(hass) # Restore clients that is not a part of active clients list. for entity in registry.entities.values(): diff --git a/homeassistant/components/netatmo/device_trigger.py b/homeassistant/components/netatmo/device_trigger.py index e3173fde160..7a9acac2f96 100644 --- a/homeassistant/components/netatmo/device_trigger.py +++ b/homeassistant/components/netatmo/device_trigger.py @@ -93,7 +93,7 @@ async def async_get_triggers( hass: HomeAssistant, device_id: str ) -> list[dict[str, Any]]: """List device triggers for Netatmo devices.""" - registry = await entity_registry.async_get_registry(hass) + registry = entity_registry.async_get(hass) device_registry = await hass.helpers.device_registry.async_get_registry() triggers = [] diff --git a/homeassistant/components/number/device_action.py b/homeassistant/components/number/device_action.py index 917bcdce74f..3d449ffc213 100644 --- a/homeassistant/components/number/device_action.py +++ b/homeassistant/components/number/device_action.py @@ -32,7 +32,7 @@ async def async_get_actions( hass: HomeAssistant, device_id: str ) -> list[dict[str, str]]: """List device actions for Number.""" - registry = await entity_registry.async_get_registry(hass) + registry = entity_registry.async_get(hass) actions: list[dict[str, str]] = [] # Get all the integrations entities for this device diff --git a/homeassistant/components/owntracks/device_tracker.py b/homeassistant/components/owntracks/device_tracker.py index ae4d88df718..92f34617462 100644 --- a/homeassistant/components/owntracks/device_tracker.py +++ b/homeassistant/components/owntracks/device_tracker.py @@ -26,7 +26,7 @@ async def async_setup_entry( ) -> None: """Set up OwnTracks based off an entry.""" # Restore previously loaded devices - dev_reg = await device_registry.async_get_registry(hass) + dev_reg = device_registry.async_get(hass) dev_ids = { identifier[1] for device in dev_reg.devices.values() diff --git a/homeassistant/components/ps4/__init__.py b/homeassistant/components/ps4/__init__.py index e6c22552fc2..7e215060d73 100644 --- a/homeassistant/components/ps4/__init__.py +++ b/homeassistant/components/ps4/__init__.py @@ -116,7 +116,7 @@ async def async_migrate_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool: # Migrate Version 2 -> Version 3: Update identifier format. if version == 2: # Prevent changing entity_id. Updates entity registry. - registry = await entity_registry.async_get_registry(hass) + registry = entity_registry.async_get(hass) for entity_id, e_entry in registry.entities.items(): if e_entry.config_entry_id == entry.entry_id: diff --git a/homeassistant/components/ps4/media_player.py b/homeassistant/components/ps4/media_player.py index ef6cc3c364b..1a1c93e210a 100644 --- a/homeassistant/components/ps4/media_player.py +++ b/homeassistant/components/ps4/media_player.py @@ -333,8 +333,8 @@ class PS4Device(MediaPlayerEntity): # If cannot get status on startup, assume info from registry. if status is None: _LOGGER.info("Assuming status from registry") - e_registry = await entity_registry.async_get_registry(self.hass) - d_registry = await device_registry.async_get_registry(self.hass) + e_registry = entity_registry.async_get(self.hass) + d_registry = device_registry.async_get(self.hass) for entity_id, entry in e_registry.entities.items(): if entry.config_entry_id == self._entry_id: self._unique_id = entry.unique_id diff --git a/homeassistant/components/ruckus_unleashed/__init__.py b/homeassistant/components/ruckus_unleashed/__init__.py index 6ea3b736dcd..2c8c8bb108d 100644 --- a/homeassistant/components/ruckus_unleashed/__init__.py +++ b/homeassistant/components/ruckus_unleashed/__init__.py @@ -44,7 +44,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool: system_info = await hass.async_add_executor_job(ruckus.system_info) - registry = await device_registry.async_get_registry(hass) + registry = device_registry.async_get(hass) ap_info = await hass.async_add_executor_job(ruckus.ap_info) for device in ap_info[API_AP][API_ID].values(): registry.async_get_or_create( diff --git a/homeassistant/components/ruckus_unleashed/device_tracker.py b/homeassistant/components/ruckus_unleashed/device_tracker.py index 562f4835547..67c86f3bb51 100644 --- a/homeassistant/components/ruckus_unleashed/device_tracker.py +++ b/homeassistant/components/ruckus_unleashed/device_tracker.py @@ -38,7 +38,7 @@ async def async_setup_entry( coordinator.async_add_listener(router_update) ) - registry = await entity_registry.async_get_registry(hass) + registry = entity_registry.async_get(hass) restore_entities(registry, coordinator, entry, async_add_entities, tracked) diff --git a/homeassistant/components/select/device_action.py b/homeassistant/components/select/device_action.py index f4c4d7883d0..f55a12da62a 100644 --- a/homeassistant/components/select/device_action.py +++ b/homeassistant/components/select/device_action.py @@ -34,7 +34,7 @@ async def async_get_actions( hass: HomeAssistant, device_id: str ) -> list[dict[str, str]]: """List device actions for Select devices.""" - registry = await entity_registry.async_get_registry(hass) + registry = entity_registry.async_get(hass) return [ { CONF_DEVICE_ID: device_id, diff --git a/homeassistant/components/select/device_condition.py b/homeassistant/components/select/device_condition.py index ed48f2afb15..6e6a3c704b3 100644 --- a/homeassistant/components/select/device_condition.py +++ b/homeassistant/components/select/device_condition.py @@ -38,7 +38,7 @@ async def async_get_conditions( hass: HomeAssistant, device_id: str ) -> list[dict[str, str]]: """List device conditions for Select devices.""" - registry = await entity_registry.async_get_registry(hass) + registry = entity_registry.async_get(hass) return [ { CONF_CONDITION: "device", diff --git a/homeassistant/components/select/device_trigger.py b/homeassistant/components/select/device_trigger.py index 79e1c4a221f..6d0378946e8 100644 --- a/homeassistant/components/select/device_trigger.py +++ b/homeassistant/components/select/device_trigger.py @@ -49,7 +49,7 @@ async def async_get_triggers( hass: HomeAssistant, device_id: str ) -> list[dict[str, Any]]: """List device triggers for Select devices.""" - registry = await entity_registry.async_get_registry(hass) + registry = entity_registry.async_get(hass) return [ { CONF_PLATFORM: "device", diff --git a/homeassistant/components/shelly/climate.py b/homeassistant/components/shelly/climate.py index ffd5e012ef7..a042254fdc6 100644 --- a/homeassistant/components/shelly/climate.py +++ b/homeassistant/components/shelly/climate.py @@ -87,7 +87,7 @@ async def async_restore_climate_entities( ) -> None: """Restore sleeping climate devices.""" - ent_reg = await entity_registry.async_get_registry(hass) + ent_reg = entity_registry.async_get(hass) entries = entity_registry.async_entries_for_config_entry( ent_reg, config_entry.entry_id ) diff --git a/homeassistant/components/shelly/entity.py b/homeassistant/components/shelly/entity.py index f544770722f..de7d3dd9437 100644 --- a/homeassistant/components/shelly/entity.py +++ b/homeassistant/components/shelly/entity.py @@ -134,7 +134,7 @@ async def async_restore_block_attribute_entities( """Restore block attributes entities.""" entities = [] - ent_reg = await entity_registry.async_get_registry(hass) + ent_reg = entity_registry.async_get(hass) entries = entity_registry.async_entries_for_config_entry( ent_reg, config_entry.entry_id ) diff --git a/homeassistant/components/traccar/device_tracker.py b/homeassistant/components/traccar/device_tracker.py index 74ce3ead901..0ed13bceefa 100644 --- a/homeassistant/components/traccar/device_tracker.py +++ b/homeassistant/components/traccar/device_tracker.py @@ -144,7 +144,7 @@ async def async_setup_entry( ] = async_dispatcher_connect(hass, TRACKER_UPDATE, _receive_data) # Restore previously loaded devices - dev_reg = await device_registry.async_get_registry(hass) + dev_reg = device_registry.async_get(hass) dev_ids = { identifier[1] for device in dev_reg.devices.values() diff --git a/homeassistant/components/vacuum/device_action.py b/homeassistant/components/vacuum/device_action.py index 702f3fe7439..e8dac646153 100644 --- a/homeassistant/components/vacuum/device_action.py +++ b/homeassistant/components/vacuum/device_action.py @@ -30,7 +30,7 @@ async def async_get_actions( hass: HomeAssistant, device_id: str ) -> list[dict[str, str]]: """List device actions for Vacuum devices.""" - registry = await entity_registry.async_get_registry(hass) + registry = entity_registry.async_get(hass) actions = [] # Get all the integrations entities for this device diff --git a/homeassistant/components/vacuum/device_condition.py b/homeassistant/components/vacuum/device_condition.py index 7a973c93694..fa76dd800ec 100644 --- a/homeassistant/components/vacuum/device_condition.py +++ b/homeassistant/components/vacuum/device_condition.py @@ -32,7 +32,7 @@ async def async_get_conditions( hass: HomeAssistant, device_id: str ) -> list[dict[str, str]]: """List device conditions for Vacuum devices.""" - registry = await entity_registry.async_get_registry(hass) + registry = entity_registry.async_get(hass) conditions = [] # Get all the integrations entities for this device diff --git a/homeassistant/components/vacuum/device_trigger.py b/homeassistant/components/vacuum/device_trigger.py index 25a874a1e69..502f9f01410 100644 --- a/homeassistant/components/vacuum/device_trigger.py +++ b/homeassistant/components/vacuum/device_trigger.py @@ -40,7 +40,7 @@ async def async_get_triggers( hass: HomeAssistant, device_id: str ) -> list[dict[str, Any]]: """List device triggers for Vacuum devices.""" - registry = await entity_registry.async_get_registry(hass) + registry = entity_registry.async_get(hass) triggers = [] # Get all the integrations entities for this device diff --git a/homeassistant/components/water_heater/device_action.py b/homeassistant/components/water_heater/device_action.py index dae9e4d579b..f200498c350 100644 --- a/homeassistant/components/water_heater/device_action.py +++ b/homeassistant/components/water_heater/device_action.py @@ -32,7 +32,7 @@ async def async_get_actions( hass: HomeAssistant, device_id: str ) -> list[dict[str, str]]: """List device actions for Water Heater devices.""" - registry = await entity_registry.async_get_registry(hass) + registry = entity_registry.async_get(hass) actions = [] for entry in entity_registry.async_entries_for_device(registry, device_id): diff --git a/homeassistant/config_entries.py b/homeassistant/config_entries.py index 97278f3b2e3..7dfbb131c1b 100644 --- a/homeassistant/config_entries.py +++ b/homeassistant/config_entries.py @@ -1549,7 +1549,7 @@ class EntityRegistryDisabledHandler: async def _handle_entry_updated(self, event: Event) -> None: """Handle entity registry entry update.""" if self.registry is None: - self.registry = await entity_registry.async_get_registry(self.hass) + self.registry = entity_registry.async_get(self.hass) entity_entry = self.registry.async_get(event.data["entity_id"]) diff --git a/homeassistant/helpers/device_registry.py b/homeassistant/helpers/device_registry.py index c45b7d5f37b..7299da43958 100644 --- a/homeassistant/helpers/device_registry.py +++ b/homeassistant/helpers/device_registry.py @@ -823,7 +823,7 @@ def async_setup_cleanup(hass: HomeAssistant, dev_reg: DeviceRegistry) -> None: async def cleanup() -> None: """Cleanup.""" - ent_reg = await entity_registry.async_get_registry(hass) + ent_reg = entity_registry.async_get(hass) async_cleanup(hass, dev_reg, ent_reg) debounced_cleanup = Debouncer( diff --git a/script/scaffold/templates/device_action/integration/device_action.py b/script/scaffold/templates/device_action/integration/device_action.py index 5eb5249211b..a9d77853e55 100644 --- a/script/scaffold/templates/device_action/integration/device_action.py +++ b/script/scaffold/templates/device_action/integration/device_action.py @@ -33,7 +33,7 @@ async def async_get_actions( hass: HomeAssistant, device_id: str ) -> list[dict[str, str]]: """List device actions for NEW_NAME devices.""" - registry = await entity_registry.async_get_registry(hass) + registry = entity_registry.async_get(hass) actions = [] # TODO Read this comment and remove it. diff --git a/script/scaffold/templates/device_condition/integration/device_condition.py b/script/scaffold/templates/device_condition/integration/device_condition.py index 6f129289af8..cc5ad765885 100644 --- a/script/scaffold/templates/device_condition/integration/device_condition.py +++ b/script/scaffold/templates/device_condition/integration/device_condition.py @@ -35,7 +35,7 @@ async def async_get_conditions( hass: HomeAssistant, device_id: str ) -> list[dict[str, str]]: """List device conditions for NEW_NAME devices.""" - registry = await entity_registry.async_get_registry(hass) + registry = entity_registry.async_get(hass) conditions = [] # Get all the integrations entities for this device diff --git a/script/scaffold/templates/device_trigger/integration/device_trigger.py b/script/scaffold/templates/device_trigger/integration/device_trigger.py index 9082d27953a..a03e27394e2 100644 --- a/script/scaffold/templates/device_trigger/integration/device_trigger.py +++ b/script/scaffold/templates/device_trigger/integration/device_trigger.py @@ -41,7 +41,7 @@ async def async_get_triggers( hass: HomeAssistant, device_id: str ) -> list[dict[str, Any]]: """List device triggers for NEW_NAME devices.""" - registry = await entity_registry.async_get_registry(hass) + registry = entity_registry.async_get(hass) triggers = [] # TODO Read this comment and remove it.