Update ruff to v0.0.280 (#97102)
This commit is contained in:
parent
bdd253328d
commit
86708b5590
20 changed files with 25 additions and 60 deletions
|
@ -161,10 +161,10 @@ class HomematicipGenericEntity(Entity):
|
|||
if device_id in device_registry.devices:
|
||||
# This will also remove associated entities from entity registry.
|
||||
device_registry.async_remove_device(device_id)
|
||||
else:
|
||||
else: # noqa: PLR5501
|
||||
# Remove from entity registry.
|
||||
# Only relevant for entities that do not belong to a device.
|
||||
if entity_id := self.registry_entry.entity_id: # noqa: PLR5501
|
||||
if entity_id := self.registry_entry.entity_id:
|
||||
entity_registry = er.async_get(self.hass)
|
||||
if entity_id in entity_registry.entities:
|
||||
entity_registry.async_remove(entity_id)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue