Use the action field enums in message_bird (#195973)

This commit is contained in:
epenet
2026-12-02 12:19:53 +00:00
committed by GitHub
parent de3b9365c3
commit 296f3f394d
@@ -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