diff --git a/.strict-typing b/.strict-typing index 34a51978216..20264974546 100644 --- a/.strict-typing +++ b/.strict-typing @@ -583,6 +583,7 @@ homeassistant.components.vacuum.* homeassistant.components.vallox.* homeassistant.components.valve.* homeassistant.components.velbus.* +homeassistant.components.velux.* homeassistant.components.vivotek.* homeassistant.components.vlc_telnet.* homeassistant.components.vodafone_station.* diff --git a/homeassistant/components/velux/__init__.py b/homeassistant/components/velux/__init__.py index 3c7cec96e4c..3d672a574d6 100644 --- a/homeassistant/components/velux/__init__.py +++ b/homeassistant/components/velux/__init__.py @@ -11,7 +11,7 @@ from homeassistant.const import ( CONF_PASSWORD, EVENT_HOMEASSISTANT_STOP, ) -from homeassistant.core import HomeAssistant, ServiceCall +from homeassistant.core import Event, HomeAssistant, ServiceCall from homeassistant.exceptions import ( ConfigEntryAuthFailed, ConfigEntryNotReady, @@ -127,7 +127,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: VeluxConfigEntry) -> boo connections=connections, ) - async def on_hass_stop(event): + async def on_hass_stop(_: Event) -> None: """Close connection when hass stops.""" LOGGER.debug("Velux interface terminated") await pyvlx.disconnect() diff --git a/homeassistant/components/velux/entity.py b/homeassistant/components/velux/entity.py index 2743cf31694..a43eba6cb7b 100644 --- a/homeassistant/components/velux/entity.py +++ b/homeassistant/components/velux/entity.py @@ -70,7 +70,7 @@ class VeluxEntity(Entity): via_device=(DOMAIN, f"gateway_{config_entry_id}"), ) - async def after_update_callback(self, node) -> None: + async def after_update_callback(self, _: Node) -> None: """Call after device was updated.""" self._attr_available = self.node.pyvlx.get_connected() if not self._attr_available: diff --git a/homeassistant/components/velux/quality_scale.yaml b/homeassistant/components/velux/quality_scale.yaml index 1cebdb6819a..646264d1e33 100644 --- a/homeassistant/components/velux/quality_scale.yaml +++ b/homeassistant/components/velux/quality_scale.yaml @@ -57,4 +57,4 @@ rules: # Platinum async-dependency: todo inject-websession: todo - strict-typing: todo + strict-typing: done diff --git a/mypy.ini b/mypy.ini index 8afddd21a56..b1f029ceae3 100644 --- a/mypy.ini +++ b/mypy.ini @@ -5589,6 +5589,16 @@ disallow_untyped_defs = true warn_return_any = true warn_unreachable = true +[mypy-homeassistant.components.velux.*] +check_untyped_defs = true +disallow_incomplete_defs = true +disallow_subclassing_any = true +disallow_untyped_calls = true +disallow_untyped_decorators = true +disallow_untyped_defs = true +warn_return_any = true +warn_unreachable = true + [mypy-homeassistant.components.vivotek.*] check_untyped_defs = true disallow_incomplete_defs = true