Add type hints to honeywell (#69217)

This commit is contained in:
epenet 2022-04-03 22:06:53 +02:00 committed by GitHub
parent 14a19aea03
commit f6ec0a6323
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 7 deletions

View file

@ -14,6 +14,8 @@ from homeassistant.components.climate.const import (
CURRENT_HVAC_FAN,
CURRENT_HVAC_HEAT,
CURRENT_HVAC_IDLE,
DEFAULT_MAX_TEMP,
DEFAULT_MIN_TEMP,
FAN_AUTO,
FAN_DIFFUSE,
FAN_ON,
@ -144,7 +146,7 @@ class HoneywellUSThermostat(ClimateEntity):
@property
def extra_state_attributes(self) -> dict[str, Any]:
"""Return the device specific state attributes."""
data = {}
data: dict[str, Any] = {}
data[ATTR_FAN_ACTION] = "running" if self._device.fan_running else "idle"
data[ATTR_PERMANENT_HOLD] = self._is_permanent_hold()
if self._device.raw_dr_data:
@ -158,7 +160,7 @@ class HoneywellUSThermostat(ClimateEntity):
return self._device.raw_ui_data["CoolLowerSetptLimit"]
if self.hvac_mode == HVAC_MODE_HEAT:
return self._device.raw_ui_data["HeatLowerSetptLimit"]
return None
return DEFAULT_MIN_TEMP
@property
def max_temp(self) -> float:
@ -167,7 +169,7 @@ class HoneywellUSThermostat(ClimateEntity):
return self._device.raw_ui_data["CoolUpperSetptLimit"]
if self.hvac_mode in [HVAC_MODE_HEAT, HVAC_MODE_HEAT_COOL]:
return self._device.raw_ui_data["HeatUpperSetptLimit"]
return None
return DEFAULT_MAX_TEMP
@property
def current_humidity(self) -> int | None:

View file

@ -2698,9 +2698,6 @@ ignore_errors = true
[mypy-homeassistant.components.home_plus_control.api]
ignore_errors = true
[mypy-homeassistant.components.honeywell.climate]
ignore_errors = true
[mypy-homeassistant.components.icloud]
ignore_errors = true

View file

@ -60,7 +60,6 @@ IGNORED_MODULES: Final[list[str]] = [
"homeassistant.components.here_travel_time.sensor",
"homeassistant.components.home_plus_control",
"homeassistant.components.home_plus_control.api",
"homeassistant.components.honeywell.climate",
"homeassistant.components.icloud",
"homeassistant.components.icloud.account",
"homeassistant.components.icloud.device_tracker",