Add climate setup type hints [a-l] (#63278)
Co-authored-by: epenet <epenet@users.noreply.github.com>
This commit is contained in:
parent
cbd3cd4599
commit
06ebbb7cae
23 changed files with 220 additions and 36 deletions
|
@ -1,4 +1,6 @@
|
|||
"""Support for the Daikin HVAC."""
|
||||
from __future__ import annotations
|
||||
|
||||
import logging
|
||||
|
||||
import voluptuous as vol
|
||||
|
@ -28,8 +30,12 @@ from homeassistant.components.climate.const import (
|
|||
SUPPORT_SWING_MODE,
|
||||
SUPPORT_TARGET_TEMPERATURE,
|
||||
)
|
||||
from homeassistant.config_entries import ConfigEntry
|
||||
from homeassistant.const import ATTR_TEMPERATURE, CONF_HOST, CONF_NAME, TEMP_CELSIUS
|
||||
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 . import DOMAIN as DAIKIN_DOMAIN
|
||||
from .const import (
|
||||
|
@ -90,7 +96,12 @@ HA_ATTR_TO_DAIKIN = {
|
|||
DAIKIN_ATTR_ADVANCED = "adv"
|
||||
|
||||
|
||||
async def async_setup_platform(hass, config, async_add_entities, discovery_info=None):
|
||||
async def async_setup_platform(
|
||||
hass: HomeAssistant,
|
||||
config: ConfigType,
|
||||
async_add_entities: AddEntitiesCallback,
|
||||
discovery_info: DiscoveryInfoType | None = None,
|
||||
) -> None:
|
||||
"""Old way of setting up the Daikin HVAC platform.
|
||||
|
||||
Can only be called when a user accidentally mentions the platform in their
|
||||
|
@ -98,7 +109,9 @@ async def async_setup_platform(hass, config, async_add_entities, discovery_info=
|
|||
"""
|
||||
|
||||
|
||||
async def async_setup_entry(hass, entry, async_add_entities):
|
||||
async def async_setup_entry(
|
||||
hass: HomeAssistant, entry: ConfigEntry, async_add_entities: AddEntitiesCallback
|
||||
) -> None:
|
||||
"""Set up Daikin climate based on config_entry."""
|
||||
daikin_api = hass.data[DAIKIN_DOMAIN].get(entry.entry_id)
|
||||
async_add_entities([DaikinClimate(daikin_api)], update_before_add=True)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue