mirror of
https://github.com/home-assistant/core.git
synced 2025-12-24 21:06:19 +00:00
Use assignment expressions 09 (#57790)
This commit is contained in:
@@ -30,9 +30,7 @@ async def _async_reproduce_state(
|
||||
reproduce_options: dict[str, Any] | None = None,
|
||||
) -> None:
|
||||
"""Reproduce a single state."""
|
||||
cur_state = hass.states.get(state.entity_id)
|
||||
|
||||
if cur_state is None:
|
||||
if (cur_state := hass.states.get(state.entity_id)) is None:
|
||||
_LOGGER.warning("Unable to find entity %s", state.entity_id)
|
||||
return
|
||||
|
||||
|
||||
Reference in New Issue
Block a user