Add hints to get_service in integrations (2/2) (#86693)
This commit is contained in:
parent
8a5a1b810a
commit
0d579f6ac3
20 changed files with 180 additions and 20 deletions
|
@ -1,4 +1,6 @@
|
|||
"""Twilio Call platform for notify component."""
|
||||
from __future__ import annotations
|
||||
|
||||
import logging
|
||||
import urllib
|
||||
|
||||
|
@ -11,7 +13,9 @@ from homeassistant.components.notify import (
|
|||
BaseNotificationService,
|
||||
)
|
||||
from homeassistant.components.twilio import DATA_TWILIO
|
||||
from homeassistant.core import HomeAssistant
|
||||
import homeassistant.helpers.config_validation as cv
|
||||
from homeassistant.helpers.typing import ConfigType, DiscoveryInfoType
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
|
@ -26,7 +30,11 @@ PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend(
|
|||
)
|
||||
|
||||
|
||||
def get_service(hass, config, discovery_info=None):
|
||||
def get_service(
|
||||
hass: HomeAssistant,
|
||||
config: ConfigType,
|
||||
discovery_info: DiscoveryInfoType | None = None,
|
||||
) -> TwilioCallNotificationService:
|
||||
"""Get the Twilio Call notification service."""
|
||||
return TwilioCallNotificationService(
|
||||
hass.data[DATA_TWILIO], config[CONF_FROM_NUMBER]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue