Use the action field enums in netgear_lte (#196037)

This commit is contained in:
epenet
2026-12-02 09:07:46 -05:00
committed by GitHub
parent b903b7e4b9
commit e47083ea9d
@@ -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")