1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-24 21:06:19 +00:00
This commit is contained in:
Paulus Schoutsen
2019-07-31 12:25:30 -07:00
parent da05dfe708
commit 4de97abc3a
2676 changed files with 163166 additions and 140084 deletions

View File

@@ -4,16 +4,19 @@ All containing methods are legacy helpers that should not be used by new
components. Instead call the service directly.
"""
from homeassistant.components.notify import (
ATTR_DATA, ATTR_MESSAGE, ATTR_TITLE, DOMAIN, SERVICE_NOTIFY)
ATTR_DATA,
ATTR_MESSAGE,
ATTR_TITLE,
DOMAIN,
SERVICE_NOTIFY,
)
from homeassistant.loader import bind_hass
@bind_hass
def send_message(hass, message, title=None, data=None):
"""Send a notification message."""
info = {
ATTR_MESSAGE: message
}
info = {ATTR_MESSAGE: message}
if title is not None:
info[ATTR_TITLE] = title