From b76e8c5722522af26a446492d87fdb2d02d20eda Mon Sep 17 00:00:00 2001 From: jan iversen Date: Mon, 23 Aug 2021 16:02:31 +0200 Subject: [PATCH] Please mypy. (#55069) --- homeassistant/components/smarty/sensor.py | 3 ++- mypy.ini | 3 --- script/hassfest/mypy_config.py | 1 - 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/homeassistant/components/smarty/sensor.py b/homeassistant/components/smarty/sensor.py index a76e4b0f567..44a8392991a 100644 --- a/homeassistant/components/smarty/sensor.py +++ b/homeassistant/components/smarty/sensor.py @@ -1,4 +1,5 @@ """Support for Salda Smarty XP/XV Ventilation Unit Sensors.""" +from __future__ import annotations import datetime as dt import logging @@ -43,7 +44,7 @@ class SmartySensor(SensorEntity): ): """Initialize the entity.""" self._name = name - self._state = None + self._state: dt.datetime | None = None self._sensor_type = device_class self._unit_of_measurement = unit_of_measurement self._smarty = smarty diff --git a/mypy.ini b/mypy.ini index 69b27cd1093..5c2c8678999 100644 --- a/mypy.ini +++ b/mypy.ini @@ -1586,9 +1586,6 @@ ignore_errors = true [mypy-homeassistant.components.smarttub.*] ignore_errors = true -[mypy-homeassistant.components.smarty.*] -ignore_errors = true - [mypy-homeassistant.components.solaredge.*] ignore_errors = true diff --git a/script/hassfest/mypy_config.py b/script/hassfest/mypy_config.py index b3968bc58c5..b22919ce5fa 100644 --- a/script/hassfest/mypy_config.py +++ b/script/hassfest/mypy_config.py @@ -121,7 +121,6 @@ IGNORED_MODULES: Final[list[str]] = [ "homeassistant.components.sma.*", "homeassistant.components.smartthings.*", "homeassistant.components.smarttub.*", - "homeassistant.components.smarty.*", "homeassistant.components.solaredge.*", "homeassistant.components.somfy.*", "homeassistant.components.somfy_mylink.*",