Use assignment expressions 24 (#58181)
This commit is contained in:
parent
eab235173b
commit
ea2e94a4e5
21 changed files with 29 additions and 66 deletions
|
@ -43,10 +43,7 @@ class TwilioCallNotificationService(BaseNotificationService):
|
|||
|
||||
def send_message(self, message="", **kwargs):
|
||||
"""Call to specified target users."""
|
||||
|
||||
targets = kwargs.get(ATTR_TARGET)
|
||||
|
||||
if not targets:
|
||||
if not (targets := kwargs.get(ATTR_TARGET)):
|
||||
_LOGGER.info("At least 1 target is required")
|
||||
return
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue