diff --git a/homeassistant/components/pushover/notify.py b/homeassistant/components/pushover/notify.py index dbd7414c08f7..fe5866897eaa 100644 --- a/homeassistant/components/pushover/notify.py +++ b/homeassistant/components/pushover/notify.py @@ -6,11 +6,9 @@ from typing import TYPE_CHECKING, Any, override from pushover_complete import BadAPIRequestError, PushoverAPI from homeassistant.components.notify import ( - ATTR_DATA, - ATTR_TARGET, - ATTR_TITLE, ATTR_TITLE_DEFAULT, BaseNotificationService, + NotifyServiceArgument, ) from homeassistant.core import HomeAssistant from homeassistant.exceptions import HomeAssistantError, ServiceValidationError @@ -79,8 +77,8 @@ class PushoverNotificationService(BaseNotificationService): """Send a message to a user.""" # Extract params from data dict - title = kwargs.get(ATTR_TITLE, ATTR_TITLE_DEFAULT) - data = kwargs.get(ATTR_DATA) or {} + title = kwargs.get(NotifyServiceArgument.TITLE, ATTR_TITLE_DEFAULT) + data = kwargs.get(NotifyServiceArgument.DATA) or {} url = data.get(ATTR_URL) url_title = data.get(ATTR_URL_TITLE) priority = data.get(ATTR_PRIORITY) @@ -117,7 +115,7 @@ class PushoverNotificationService(BaseNotificationService): result = self.pushover.send_message( user=self._user_key, message=message, - device=",".join(kwargs.get(ATTR_TARGET, [])), + device=",".join(kwargs.get(NotifyServiceArgument.TARGET, [])), title=title, url=url, url_title=url_title,