Avoid linear search in ps4 to find devices (#114814)
This commit is contained in:
parent
0710f4c661
commit
cc96bc44a0
1 changed files with 11 additions and 10 deletions
|
@ -350,8 +350,9 @@ class PS4Device(MediaPlayerEntity):
|
||||||
self._attr_unique_id = entry.unique_id
|
self._attr_unique_id = entry.unique_id
|
||||||
self.entity_id = entry.entity_id
|
self.entity_id = entry.entity_id
|
||||||
break
|
break
|
||||||
for device in d_registry.devices.values():
|
for device in d_registry.devices.get_devices_for_config_entry_id(
|
||||||
if self._entry_id in device.config_entries:
|
self._entry_id
|
||||||
|
):
|
||||||
self._attr_device_info = DeviceInfo(
|
self._attr_device_info = DeviceInfo(
|
||||||
identifiers=device.identifiers,
|
identifiers=device.identifiers,
|
||||||
manufacturer=device.manufacturer,
|
manufacturer=device.manufacturer,
|
||||||
|
|
Loading…
Add table
Reference in a new issue