Add hints to get_service in tplink-lte (#86702)
This commit is contained in:
parent
d4955a3d87
commit
95d0329d6c
1 changed files with 10 additions and 2 deletions
|
@ -1,4 +1,6 @@
|
||||||
"""Support for TP-Link LTE notifications."""
|
"""Support for TP-Link LTE notifications."""
|
||||||
|
from __future__ import annotations
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
import attr
|
import attr
|
||||||
|
@ -6,16 +8,22 @@ import tp_connected
|
||||||
|
|
||||||
from homeassistant.components.notify import ATTR_TARGET, BaseNotificationService
|
from homeassistant.components.notify import ATTR_TARGET, BaseNotificationService
|
||||||
from homeassistant.const import CONF_RECIPIENT
|
from homeassistant.const import CONF_RECIPIENT
|
||||||
|
from homeassistant.core import HomeAssistant
|
||||||
|
from homeassistant.helpers.typing import ConfigType, DiscoveryInfoType
|
||||||
|
|
||||||
from . import DATA_KEY
|
from . import DATA_KEY
|
||||||
|
|
||||||
_LOGGER = logging.getLogger(__name__)
|
_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,
|
||||||
|
) -> TplinkNotifyService | None:
|
||||||
"""Get the notification service."""
|
"""Get the notification service."""
|
||||||
if discovery_info is None:
|
if discovery_info is None:
|
||||||
return
|
return None
|
||||||
return TplinkNotifyService(hass, discovery_info)
|
return TplinkNotifyService(hass, discovery_info)
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue