mirror of
https://github.com/home-assistant/core.git
synced 2026-12-02 11:33:11 -04:00
Use the action field enums in message_bird (#195973)
This commit is contained in:
@@ -8,9 +8,9 @@ from messagebird.client import ErrorException
|
||||
import probatio
|
||||
|
||||
from homeassistant.components.notify import (
|
||||
ATTR_TARGET,
|
||||
PLATFORM_SCHEMA as NOTIFY_PLATFORM_SCHEMA,
|
||||
BaseNotificationService,
|
||||
NotifyServiceArgument,
|
||||
)
|
||||
from homeassistant.const import CONF_API_KEY, CONF_SENDER
|
||||
from homeassistant.core import HomeAssistant
|
||||
@@ -60,7 +60,7 @@ class MessageBirdNotificationService(BaseNotificationService):
|
||||
@override
|
||||
def send_message(self, message: str = "", **kwargs: Any) -> None:
|
||||
"""Send a message to a specified target."""
|
||||
if not (targets := kwargs.get(ATTR_TARGET)):
|
||||
if not (targets := kwargs.get(NotifyServiceArgument.TARGET)):
|
||||
_LOGGER.error("No target specified")
|
||||
return
|
||||
|
||||
|
||||
Reference in New Issue
Block a user