Use assignment expressions 19 (#57968)
This commit is contained in:
parent
786e1f9b6a
commit
ff853b2d53
23 changed files with 24 additions and 51 deletions
|
@ -27,8 +27,7 @@ async def handle_internal(
|
|||
) -> None:
|
||||
"""Handle a mysensors internal message."""
|
||||
internal = msg.gateway.const.Internal(msg.sub_type)
|
||||
handler = HANDLERS.get(internal.name)
|
||||
if handler is None:
|
||||
if (handler := HANDLERS.get(internal.name)) is None:
|
||||
return
|
||||
await handler(hass, gateway_id, msg)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue