mirror of
https://github.com/home-assistant/core.git
synced 2025-11-14 05:20:17 +00:00
Use assignment expressions 29 (#58713)
This commit is contained in:
@@ -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
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user