Update ruff to v0.0.280 (#97102)

This commit is contained in:
Franck Nijhof 2023-07-23 22:00:26 +02:00 committed by GitHub
parent bdd253328d
commit 86708b5590
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
20 changed files with 25 additions and 60 deletions

View file

@ -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)