Use assignment expressions 29 (#58713)

This commit is contained in:
Marc Mueller
2021-10-30 16:31:43 +02:00
committed by GitHub
parent 887d04be60
commit b1d49b3b66
15 changed files with 27 additions and 62 deletions

View File

@@ -49,9 +49,7 @@ async def async_update_entity(hass: HomeAssistant, entity_id: str) -> None:
)
return
entity_obj = entity_comp.get_entity(entity_id)
if entity_obj is None:
if (entity_obj := entity_comp.get_entity(entity_id)) is None:
logging.getLogger(__name__).warning(
"Forced update failed. Entity %s not found.", entity_id
)