diff --git a/homeassistant/components/alarm_control_panel/device_action.py b/homeassistant/components/alarm_control_panel/device_action.py index 2680b033b030..ff14b851df80 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 a378cf262edf..4764d5cfcbef 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 ce53596fc8dc..18508661034e 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 2b1a3bf3a195..d1fca811fcc5 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 81189417c2b3..45160eed8eb4 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 dd5842cd2a80..56bac123d286 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 6bd6f4c3e027..e40cf32f2a93 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 debb2368cf25..9bdf21f168e8 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 cca608187a27..bb66d54b79bc 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 f960fcdcce69..f7b2f54f4dd7 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 0703d3c76464..1a6adabda63f 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 4350f03cefc4..134e9d8dca37 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 b0882137d7f4..7e27ea29f98f 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 c92b2905be27..bd4b2852019a 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 fb0e1385fba7..ea648ed7495b 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 c8e9a5d7a0d4..ee643c59b127 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 db51ab34baaa..03f0bb1fea11 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 c58c247d5699..b8e8d2a13aef 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 e4b0440e8697..a2d15097335e 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 5a92d04e4980..b625cabbbc1c 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 68735bfa3869..e4fe6cfa1038 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 66bb582e6e0b..cea3adcde00a 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 092aff8878dd..038c2f1c0da4 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 a818a2b5fa40..cdaa02de6189 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 75415bbf3e17..d875cadb4461 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 5f57bcea48eb..2f398790ac3c 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 aeed2fd646a4..9644e5e00108 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 166415caf397..dee4a5de08d6 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 e3173fde1608..7a9acac2f967 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 917bcdce74f0..3d449ffc2132 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 ae4d88df7188..92f346174620 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 e6c22552fc2f..7e215060d735 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 ef6cc3c364b5..1a1c93e210a8 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 6ea3b736dcd4..2c8c8bb108d2 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 562f4835547b..67c86f3bb516 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 f4c4d7883d08..f55a12da62aa 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 ed48f2afb15b..6e6a3c704b36 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 79e1c4a221fc..6d0378946e82 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 ffd5e012ef79..a042254fdc62 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 f544770722f4..de7d3dd9437d 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 74ce3ead9012..0ed13bceefaf 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 702f3fe74396..e8dac646153e 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 7a973c936948..fa76dd800ecd 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 25a874a1e694..502f9f01410a 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 dae9e4d579be..f200498c350b 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 97278f3b2e35..7dfbb131c1bb 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 c45b7d5f37b4..7299da43958b 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 5eb5249211b8..a9d77853e553 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 6f129289af84..cc5ad765885d 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 9082d27953af..a03e27394e28 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.