mirror of
https://github.com/home-assistant/core.git
synced 2025-07-21 12:17:07 +00:00
Activate mypy for wink (#55077)
This commit is contained in:
parent
cada3d1819
commit
9b472aee9a
@ -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):
|
||||
|
@ -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):
|
||||
|
@ -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:
|
||||
|
3
mypy.ini
3
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
|
||||
|
||||
|
@ -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.*",
|
||||
|
Loading…
x
Reference in New Issue
Block a user