diff --git a/homeassistant/components/wink/__init__.py b/homeassistant/components/wink/__init__.py index f346d9145f8..702851a5e14 100644 --- a/homeassistant/components/wink/__init__.py +++ b/homeassistant/components/wink/__init__.py @@ -1,9 +1,12 @@ """Support for Wink hubs.""" +from __future__ import annotations + from datetime import timedelta import json import logging import os import time +from typing import Any from aiohttp.web import Response from pubnubsubhandler import PubNubSubscriptionHandler @@ -208,7 +211,7 @@ WINK_COMPONENTS = [ "water_heater", ] -WINK_HUBS = [] +WINK_HUBS: list[Any] = [] def _request_app_setup(hass, config): diff --git a/homeassistant/components/wink/climate.py b/homeassistant/components/wink/climate.py index 4c783e6bde1..7836d71614f 100644 --- a/homeassistant/components/wink/climate.py +++ b/homeassistant/components/wink/climate.py @@ -234,7 +234,7 @@ class WinkThermostat(WinkDevice, ClimateEntity): return HVAC_MODE_HEAT if wink_mode == "eco": return HVAC_MODE_AUTO - return WINK_HVAC_TO_HA.get(wink_mode) + return WINK_HVAC_TO_HA.get(wink_mode, "") @property def hvac_modes(self): @@ -437,7 +437,7 @@ class WinkAC(WinkDevice, ClimateEntity): wink_mode = self.wink.current_mode() if wink_mode == "auto_eco": return HVAC_MODE_COOL - return WINK_HVAC_TO_HA.get(wink_mode) + return WINK_HVAC_TO_HA.get(wink_mode, "") @property def hvac_modes(self): diff --git a/homeassistant/components/wink/fan.py b/homeassistant/components/wink/fan.py index 3aab66e353d..b918d596ef4 100644 --- a/homeassistant/components/wink/fan.py +++ b/homeassistant/components/wink/fan.py @@ -1,4 +1,6 @@ """Support for Wink fans.""" +from __future__ import annotations + import pywink from homeassistant.components.fan import ( @@ -67,7 +69,7 @@ class WinkFanDevice(WinkDevice, FanEntity): return self.wink.state() @property - def speed(self) -> str: + def speed(self) -> str | None: """Return the current speed.""" current_wink_speed = self.wink.current_fan_speed() if SPEED_AUTO == current_wink_speed: diff --git a/mypy.ini b/mypy.ini index e91ddd41902..767ecf18ea1 100644 --- a/mypy.ini +++ b/mypy.ini @@ -1655,9 +1655,6 @@ ignore_errors = true [mypy-homeassistant.components.wemo.*] ignore_errors = true -[mypy-homeassistant.components.wink.*] -ignore_errors = true - [mypy-homeassistant.components.withings.*] ignore_errors = true diff --git a/script/hassfest/mypy_config.py b/script/hassfest/mypy_config.py index 936e8ea4234..799a36f92ea 100644 --- a/script/hassfest/mypy_config.py +++ b/script/hassfest/mypy_config.py @@ -144,7 +144,6 @@ IGNORED_MODULES: Final[list[str]] = [ "homeassistant.components.verisure.*", "homeassistant.components.vizio.*", "homeassistant.components.wemo.*", - "homeassistant.components.wink.*", "homeassistant.components.withings.*", "homeassistant.components.xbox.*", "homeassistant.components.xiaomi_aqara.*",