mirror of
https://github.com/home-assistant/core.git
synced 2026-12-02 11:33:11 -04:00
Use the action field enums in netgear_lte (#196037)
This commit is contained in:
@@ -5,7 +5,10 @@ from typing import Any, override
|
||||
import eternalegypt
|
||||
from eternalegypt.eternalegypt import Modem
|
||||
|
||||
from homeassistant.components.notify import ATTR_TARGET, BaseNotificationService
|
||||
from homeassistant.components.notify import (
|
||||
BaseNotificationService,
|
||||
NotifyServiceArgument,
|
||||
)
|
||||
from homeassistant.const import CONF_RECIPIENT
|
||||
from homeassistant.core import HomeAssistant
|
||||
from homeassistant.exceptions import HomeAssistantError
|
||||
@@ -46,7 +49,7 @@ class NetgearNotifyService(BaseNotificationService):
|
||||
if not self.modem.token:
|
||||
LOGGER.error("Modem not ready")
|
||||
return
|
||||
if not (targets := kwargs.get(ATTR_TARGET)):
|
||||
if not (targets := kwargs.get(NotifyServiceArgument.TARGET)):
|
||||
targets = self.config[CONF_NOTIFY][CONF_RECIPIENT]
|
||||
if not targets:
|
||||
LOGGER.warning("No recipients")
|
||||
|
||||
Reference in New Issue
Block a user