Add hints to get_service in netgear-lte (#86700)

This commit is contained in:
epenet 2023-01-26 16:54:57 +01:00 committed by GitHub
parent 95d0329d6c
commit 8a5a1b810a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,20 +1,28 @@
"""Support for Netgear LTE notifications."""
from __future__ import annotations
import logging
import attr
import eternalegypt
from homeassistant.components.notify import ATTR_TARGET, BaseNotificationService
from homeassistant.core import HomeAssistant
from homeassistant.helpers.typing import ConfigType, DiscoveryInfoType
from . import CONF_NOTIFY, CONF_RECIPIENT, DATA_KEY
_LOGGER = logging.getLogger(__name__)
async def async_get_service(hass, config, discovery_info=None):
async def async_get_service(
hass: HomeAssistant,
config: ConfigType,
discovery_info: DiscoveryInfoType | None = None,
) -> NetgearNotifyService | None:
"""Get the notification service."""
if discovery_info is None:
return
return None
return NetgearNotifyService(hass, discovery_info)