Use assignment expressions 22 (#57971)

This commit is contained in:
Marc Mueller 2021-10-21 08:33:10 +02:00 committed by GitHub
parent ea2bc3fde1
commit 62c20860ac
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
18 changed files with 29 additions and 64 deletions

View file

@ -70,8 +70,7 @@ class AlexaConfig(AbstractConfig):
return self._config[CONF_FILTER](entity_id)
entity_registry = er.async_get(self.hass)
registry_entry = entity_registry.async_get(entity_id)
if registry_entry:
if registry_entry := entity_registry.async_get(entity_id):
auxiliary_entity = registry_entry.entity_category in (
ENTITY_CATEGORY_CONFIG,
ENTITY_CATEGORY_DIAGNOSTIC,