Use assignment expressions 11 (#57792)
This commit is contained in:
parent
238b488642
commit
aa7dc78a1e
25 changed files with 45 additions and 111 deletions
|
@ -41,9 +41,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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue