diff --git a/.strict-typing b/.strict-typing index 6f2a4c33a83..e35d5439844 100644 --- a/.strict-typing +++ b/.strict-typing @@ -129,6 +129,7 @@ homeassistant.components.greeneye_monitor.* homeassistant.components.group.* homeassistant.components.guardian.* homeassistant.components.hardkernel.* +homeassistant.components.hardware.* homeassistant.components.history.* homeassistant.components.homeassistant.triggers.event homeassistant.components.homeassistant_alerts.* diff --git a/homeassistant/components/hardware/hardware.py b/homeassistant/components/hardware/hardware.py index e07f70022f4..cc904fbf131 100644 --- a/homeassistant/components/hardware/hardware.py +++ b/homeassistant/components/hardware/hardware.py @@ -11,18 +11,16 @@ from .const import DOMAIN from .models import HardwareProtocol -async def async_process_hardware_platforms(hass: HomeAssistant): +async def async_process_hardware_platforms(hass: HomeAssistant) -> None: """Start processing hardware platforms.""" hass.data[DOMAIN]["hardware_platform"] = {} await async_process_integration_platforms(hass, DOMAIN, _register_hardware_platform) - return True - async def _register_hardware_platform( hass: HomeAssistant, integration_domain: str, platform: HardwareProtocol -): +) -> None: """Register a hardware platform.""" if integration_domain == DOMAIN: return diff --git a/homeassistant/components/hardware/websocket_api.py b/homeassistant/components/hardware/websocket_api.py index d8dc5f28fdd..66b90edc893 100644 --- a/homeassistant/components/hardware/websocket_api.py +++ b/homeassistant/components/hardware/websocket_api.py @@ -74,7 +74,7 @@ async def ws_info( @websocket_api.async_response async def ws_subscribe_system_status( hass: HomeAssistant, connection: websocket_api.ActiveConnection, msg: dict[str, Any] -): +) -> None: """Subscribe to system status updates.""" system_status: SystemStatus = hass.data[DOMAIN]["system_status"] diff --git a/mypy.ini b/mypy.ini index c7e86780ef5..9f2c0e6fbd6 100644 --- a/mypy.ini +++ b/mypy.ini @@ -1044,6 +1044,16 @@ disallow_untyped_defs = true warn_return_any = true warn_unreachable = true +[mypy-homeassistant.components.hardware.*] +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.history.*] check_untyped_defs = true disallow_incomplete_defs = true