mirror of
https://github.com/home-assistant/core.git
synced 2025-08-28 00:41:41 +02:00
Adjust notify integration
This commit is contained in:
@@ -133,7 +133,7 @@ class BaseNotificationService:
|
|||||||
|
|
||||||
if title:
|
if title:
|
||||||
title.hass = self.hass
|
title.hass = self.hass
|
||||||
kwargs[ATTR_TITLE] = title.async_render()
|
kwargs[ATTR_TITLE] = title.async_render(parse_result=False)
|
||||||
|
|
||||||
if self._registered_targets.get(service.service) is not None:
|
if self._registered_targets.get(service.service) is not None:
|
||||||
kwargs[ATTR_TARGET] = [self._registered_targets[service.service]]
|
kwargs[ATTR_TARGET] = [self._registered_targets[service.service]]
|
||||||
@@ -141,7 +141,7 @@ class BaseNotificationService:
|
|||||||
kwargs[ATTR_TARGET] = service.data.get(ATTR_TARGET)
|
kwargs[ATTR_TARGET] = service.data.get(ATTR_TARGET)
|
||||||
|
|
||||||
message.hass = self.hass
|
message.hass = self.hass
|
||||||
kwargs[ATTR_MESSAGE] = message.async_render()
|
kwargs[ATTR_MESSAGE] = message.async_render(parse_result=False)
|
||||||
kwargs[ATTR_DATA] = service.data.get(ATTR_DATA)
|
kwargs[ATTR_DATA] = service.data.get(ATTR_DATA)
|
||||||
|
|
||||||
await self.async_send_message(**kwargs)
|
await self.async_send_message(**kwargs)
|
||||||
@@ -229,12 +229,12 @@ async def async_setup(hass, config):
|
|||||||
payload = {}
|
payload = {}
|
||||||
message = service.data[ATTR_MESSAGE]
|
message = service.data[ATTR_MESSAGE]
|
||||||
message.hass = hass
|
message.hass = hass
|
||||||
payload[ATTR_MESSAGE] = message.async_render()
|
payload[ATTR_MESSAGE] = message.async_render(parse_result=False)
|
||||||
|
|
||||||
title = service.data.get(ATTR_TITLE)
|
title = service.data.get(ATTR_TITLE)
|
||||||
if title:
|
if title:
|
||||||
title.hass = hass
|
title.hass = hass
|
||||||
payload[ATTR_TITLE] = title.async_render()
|
payload[ATTR_TITLE] = title.async_render(parse_result=False)
|
||||||
|
|
||||||
await hass.services.async_call(
|
await hass.services.async_call(
|
||||||
pn.DOMAIN, pn.SERVICE_CREATE, payload, blocking=True
|
pn.DOMAIN, pn.SERVICE_CREATE, payload, blocking=True
|
||||||
|
Reference in New Issue
Block a user