mirror of
https://github.com/home-assistant/core.git
synced 2026-12-02 19:57:03 -04:00
Use the action field enums in huawei_lte (#195770)
This commit is contained in:
@@ -5,7 +5,10 @@ from typing import Any, override
|
||||
|
||||
from huawei_lte_api.exceptions import ResponseErrorException
|
||||
|
||||
from homeassistant.components.notify import ATTR_TARGET, BaseNotificationService
|
||||
from homeassistant.components.notify import (
|
||||
BaseNotificationService,
|
||||
NotifyServiceArgument,
|
||||
)
|
||||
from homeassistant.const import ATTR_CONFIG_ENTRY_ID, CONF_RECIPIENT
|
||||
from homeassistant.core import HomeAssistant
|
||||
from homeassistant.exceptions import HomeAssistantError
|
||||
@@ -48,7 +51,7 @@ class HuaweiLteSmsNotificationService(BaseNotificationService):
|
||||
def send_message(self, message: str = "", **kwargs: Any) -> None:
|
||||
"""Send message to target numbers."""
|
||||
|
||||
targets = kwargs.get(ATTR_TARGET, self.default_targets)
|
||||
targets = kwargs.get(NotifyServiceArgument.TARGET, self.default_targets)
|
||||
if not targets or not message:
|
||||
return
|
||||
|
||||
|
||||
Reference in New Issue
Block a user