Add light setup type hints [l-r] (#63292)
Co-authored-by: epenet <epenet@users.noreply.github.com>
This commit is contained in:
parent
71cb42f53a
commit
277562bc38
15 changed files with 149 additions and 17 deletions
|
@ -1,4 +1,6 @@
|
|||
"""Support for the Opple light."""
|
||||
from __future__ import annotations
|
||||
|
||||
import logging
|
||||
|
||||
from pyoppleio.OppleLightDevice import OppleLightDevice
|
||||
|
@ -13,7 +15,10 @@ from homeassistant.components.light import (
|
|||
LightEntity,
|
||||
)
|
||||
from homeassistant.const import CONF_HOST, CONF_NAME
|
||||
from homeassistant.core import HomeAssistant
|
||||
import homeassistant.helpers.config_validation as cv
|
||||
from homeassistant.helpers.entity_platform import AddEntitiesCallback
|
||||
from homeassistant.helpers.typing import ConfigType, DiscoveryInfoType
|
||||
from homeassistant.util.color import (
|
||||
color_temperature_kelvin_to_mired as kelvin_to_mired,
|
||||
color_temperature_mired_to_kelvin as mired_to_kelvin,
|
||||
|
@ -31,7 +36,12 @@ PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend(
|
|||
)
|
||||
|
||||
|
||||
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 Opple light platform."""
|
||||
name = config[CONF_NAME]
|
||||
host = config[CONF_HOST]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue