Use assignment expressions 03 (#57710)
This commit is contained in:
@@ -396,10 +396,11 @@ async def async_extract_config_entry_ids(
|
||||
|
||||
# Some devices may have no entities
|
||||
for device_id in referenced.referenced_devices:
|
||||
if device_id in dev_reg.devices:
|
||||
device = dev_reg.async_get(device_id)
|
||||
if device is not None:
|
||||
config_entry_ids.update(device.config_entries)
|
||||
if (
|
||||
device_id in dev_reg.devices
|
||||
and (device := dev_reg.async_get(device_id)) is not None
|
||||
):
|
||||
config_entry_ids.update(device.config_entries)
|
||||
|
||||
for entity_id in referenced.referenced | referenced.indirectly_referenced:
|
||||
entry = ent_reg.async_get(entity_id)
|
||||
|
||||
Reference in New Issue
Block a user