mirror of
https://github.com/home-assistant/core.git
synced 2026-12-02 11:33:11 -04:00
Use the action field enums in mailgun (#195961)
This commit is contained in:
@@ -12,11 +12,10 @@ from pymailgunner import (
|
||||
)
|
||||
|
||||
from homeassistant.components.notify import (
|
||||
ATTR_DATA,
|
||||
ATTR_TITLE,
|
||||
ATTR_TITLE_DEFAULT,
|
||||
PLATFORM_SCHEMA as NOTIFY_PLATFORM_SCHEMA,
|
||||
BaseNotificationService,
|
||||
NotifyServiceArgument,
|
||||
)
|
||||
from homeassistant.const import CONF_API_KEY, CONF_DOMAIN, CONF_RECIPIENT, CONF_SENDER
|
||||
from homeassistant.core import HomeAssistant
|
||||
@@ -99,8 +98,8 @@ class MailgunNotificationService(BaseNotificationService):
|
||||
def send_message(self, message: str = "", **kwargs: Any) -> None:
|
||||
"""Send a mail to the recipient."""
|
||||
|
||||
subject = kwargs.get(ATTR_TITLE, ATTR_TITLE_DEFAULT)
|
||||
data = kwargs.get(ATTR_DATA)
|
||||
subject = kwargs.get(NotifyServiceArgument.TITLE, ATTR_TITLE_DEFAULT)
|
||||
data = kwargs.get(NotifyServiceArgument.DATA)
|
||||
files = data.get(ATTR_IMAGES) if data else None
|
||||
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user