Adjust type hints in airtouch4 climate entity (#76987)

This commit is contained in:
epenet 2022-08-19 10:33:34 +02:00 committed by GitHub
parent d70bc68b93
commit 801f7d1d5f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2,6 +2,7 @@
from __future__ import annotations
import logging
from typing import Any
from homeassistant.components.climate import ClimateEntity
from homeassistant.components.climate.const import (
@ -294,9 +295,11 @@ class AirtouchGroup(CoordinatorEntity, ClimateEntity):
)
return [AT_TO_HA_FAN_SPEED[speed] for speed in airtouch_fan_speeds]
async def async_set_temperature(self, **kwargs):
async def async_set_temperature(self, **kwargs: Any) -> None:
"""Set new target temperatures."""
temp = kwargs.get(ATTR_TEMPERATURE)
if (temp := kwargs.get(ATTR_TEMPERATURE)) is None:
_LOGGER.debug("Argument `temperature` is missing in set_temperature")
return
_LOGGER.debug("Setting temp of %s to %s", self._group_number, str(temp))
self._unit = await self._airtouch.SetGroupToTemperature(