Add switch setup type hints [n-r] (#63304)
Co-authored-by: epenet <epenet@users.noreply.github.com>
This commit is contained in:
parent
f39531dcfc
commit
e4a88e921f
16 changed files with 155 additions and 23 deletions
|
@ -1,4 +1,6 @@
|
|||
"""Switch platform integration for Numato USB GPIO expanders."""
|
||||
from __future__ import annotations
|
||||
|
||||
import logging
|
||||
|
||||
from numato_gpio import NumatoGpioError
|
||||
|
@ -9,14 +11,22 @@ from homeassistant.const import (
|
|||
CONF_SWITCHES,
|
||||
DEVICE_DEFAULT_NAME,
|
||||
)
|
||||
from homeassistant.core import HomeAssistant
|
||||
from homeassistant.helpers.entity import ToggleEntity
|
||||
from homeassistant.helpers.entity_platform import AddEntitiesCallback
|
||||
from homeassistant.helpers.typing import ConfigType, DiscoveryInfoType
|
||||
|
||||
from . import CONF_INVERT_LOGIC, CONF_PORTS, DATA_API, DOMAIN
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
|
||||
def setup_platform(hass, config, add_entities, discovery_info=None):
|
||||
def setup_platform(
|
||||
hass: HomeAssistant,
|
||||
config: ConfigType,
|
||||
add_entities: AddEntitiesCallback,
|
||||
discovery_info: DiscoveryInfoType | None = None,
|
||||
) -> None:
|
||||
"""Set up the configured Numato USB GPIO switch ports."""
|
||||
if discovery_info is None:
|
||||
return
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue