Add climate setup type hints [a-l] (#63278)

Co-authored-by: epenet <epenet@users.noreply.github.com>
This commit is contained in:
epenet
2022-01-03 13:26:32 +01:00
committed by GitHub
parent cbd3cd4599
commit 06ebbb7cae
23 changed files with 220 additions and 36 deletions

View File

@@ -1,5 +1,4 @@
"""CoolMasterNet platform to control of CoolMasteNet Climate Devices."""
import logging
from homeassistant.components.climate import ClimateEntity
@@ -13,9 +12,11 @@ from homeassistant.components.climate.const import (
SUPPORT_FAN_MODE,
SUPPORT_TARGET_TEMPERATURE,
)
from homeassistant.config_entries import ConfigEntry
from homeassistant.const import ATTR_TEMPERATURE, TEMP_CELSIUS, TEMP_FAHRENHEIT
from homeassistant.core import callback
from homeassistant.core import HomeAssistant, callback
from homeassistant.helpers.entity import DeviceInfo
from homeassistant.helpers.entity_platform import AddEntitiesCallback
from homeassistant.helpers.update_coordinator import CoordinatorEntity
from .const import CONF_SUPPORTED_MODES, DATA_COORDINATOR, DATA_INFO, DOMAIN
@@ -42,7 +43,11 @@ def _build_entity(coordinator, unit_id, unit, supported_modes, info):
return CoolmasterClimate(coordinator, unit_id, unit, supported_modes, info)
async def async_setup_entry(hass, config_entry, async_add_devices):
async def async_setup_entry(
hass: HomeAssistant,
config_entry: ConfigEntry,
async_add_devices: AddEntitiesCallback,
) -> None:
"""Set up the CoolMasterNet climate platform."""
supported_modes = config_entry.data.get(CONF_SUPPORTED_MODES)
info = hass.data[DOMAIN][config_entry.entry_id][DATA_INFO]