diff --git a/.strict-typing b/.strict-typing index 981e3872eb5..40fb375ca16 100644 --- a/.strict-typing +++ b/.strict-typing @@ -13,6 +13,7 @@ homeassistant.components.aladdin_connect.* homeassistant.components.alarm_control_panel.* homeassistant.components.amazon_polly.* homeassistant.components.ambee.* +homeassistant.components.ambient_station.* homeassistant.components.ampio.* homeassistant.components.automation.* homeassistant.components.binary_sensor.* diff --git a/homeassistant/components/ambient_station/__init__.py b/homeassistant/components/ambient_station/__init__.py index d2f09e47f7b..12f534eb8e9 100644 --- a/homeassistant/components/ambient_station/__init__.py +++ b/homeassistant/components/ambient_station/__init__.py @@ -32,7 +32,7 @@ from homeassistant.const import ( SPEED_MILES_PER_HOUR, TEMP_FAHRENHEIT, ) -from homeassistant.core import HomeAssistant, callback +from homeassistant.core import Event, HomeAssistant, callback from homeassistant.exceptions import ConfigEntryNotReady from homeassistant.helpers import aiohttp_client, config_validation as cv from homeassistant.helpers.dispatcher import ( @@ -320,7 +320,7 @@ async def async_setup_entry(hass: HomeAssistant, config_entry: ConfigEntry) -> b LOGGER.error("Config entry failed: %s", err) raise ConfigEntryNotReady from err - async def _async_disconnect_websocket(*_): + async def _async_disconnect_websocket(_: Event) -> None: await ambient.client.websocket.disconnect() config_entry.async_on_unload( @@ -378,7 +378,7 @@ class AmbientStation: async def _attempt_connect(self) -> None: """Attempt to connect to the socket (retrying later on fail).""" - async def connect(timestamp: int | None = None): + async def connect(timestamp: int | None = None) -> None: """Connect.""" await self.client.websocket.connect() diff --git a/mypy.ini b/mypy.ini index 942ef115135..b0d11d55262 100644 --- a/mypy.ini +++ b/mypy.ini @@ -154,6 +154,17 @@ no_implicit_optional = true warn_return_any = true warn_unreachable = true +[mypy-homeassistant.components.ambient_station.*] +check_untyped_defs = true +disallow_incomplete_defs = true +disallow_subclassing_any = true +disallow_untyped_calls = true +disallow_untyped_decorators = true +disallow_untyped_defs = true +no_implicit_optional = true +warn_return_any = true +warn_unreachable = true + [mypy-homeassistant.components.ampio.*] check_untyped_defs = true disallow_incomplete_defs = true