Improve type hints in file and huawei_lte notify (#77648)
This commit is contained in:
parent
14fc7c7595
commit
be07bb7976
2 changed files with 7 additions and 4 deletions
|
@ -15,7 +15,7 @@ from homeassistant.components.notify import (
|
|||
from homeassistant.const import CONF_FILENAME
|
||||
from homeassistant.core import HomeAssistant
|
||||
import homeassistant.helpers.config_validation as cv
|
||||
from homeassistant.helpers.typing import ConfigType
|
||||
from homeassistant.helpers.typing import ConfigType, DiscoveryInfoType
|
||||
import homeassistant.util.dt as dt_util
|
||||
|
||||
CONF_TIMESTAMP = "timestamp"
|
||||
|
@ -29,7 +29,9 @@ PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend(
|
|||
|
||||
|
||||
def get_service(
|
||||
hass: HomeAssistant, config: ConfigType, discovery_info=None
|
||||
hass: HomeAssistant,
|
||||
config: ConfigType,
|
||||
discovery_info: DiscoveryInfoType | None = None,
|
||||
) -> FileNotificationService:
|
||||
"""Get the file notification service."""
|
||||
filename: str = config[CONF_FILENAME]
|
||||
|
|
|
@ -11,6 +11,7 @@ from huawei_lte_api.exceptions import ResponseErrorException
|
|||
from homeassistant.components.notify import ATTR_TARGET, BaseNotificationService
|
||||
from homeassistant.const import CONF_RECIPIENT
|
||||
from homeassistant.core import HomeAssistant
|
||||
from homeassistant.helpers.typing import ConfigType, DiscoveryInfoType
|
||||
|
||||
from . import Router
|
||||
from .const import ATTR_UNIQUE_ID, DOMAIN
|
||||
|
@ -20,8 +21,8 @@ _LOGGER = logging.getLogger(__name__)
|
|||
|
||||
async def async_get_service(
|
||||
hass: HomeAssistant,
|
||||
config: dict[str, Any],
|
||||
discovery_info: dict[str, Any] | None = None,
|
||||
config: ConfigType,
|
||||
discovery_info: DiscoveryInfoType | None = None,
|
||||
) -> HuaweiLteSmsNotificationService | None:
|
||||
"""Get the notification service."""
|
||||
if discovery_info is None:
|
||||
|
|
Loading…
Add table
Reference in a new issue