Use assignment expressions 28 (#58189)
This commit is contained in:
parent
a3d1159a13
commit
eab235173b
24 changed files with 30 additions and 61 deletions
|
@ -202,9 +202,8 @@ class BaseNotificationService:
|
|||
"""Handle sending notification message service calls."""
|
||||
kwargs = {}
|
||||
message = service.data[ATTR_MESSAGE]
|
||||
title = service.data.get(ATTR_TITLE)
|
||||
|
||||
if title:
|
||||
if title := service.data.get(ATTR_TITLE):
|
||||
check_templates_warn(self.hass, title)
|
||||
title.hass = self.hass
|
||||
kwargs[ATTR_TITLE] = title.async_render(parse_result=False)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue