restart_ha
Restart the Home Assistant system to apply changes or resolve issues, temporarily pausing all smart home operations during the process.
Instructions
Restart Home Assistant
⚠️ WARNING: Temporarily disrupts all Home Assistant operations
Returns: Result of restart operation
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- app/server.py:866-878 (handler)The main handler function for the 'restart_ha' tool. This is the entry point registered with MCP via @mcp.tool(). It logs the action and delegates to the restart_home_assistant helper.@mcp.tool() @async_handler("restart_ha") async def restart_ha() -> Dict[str, Any]: """ Restart Home Assistant ⚠️ WARNING: Temporarily disrupts all Home Assistant operations Returns: Result of restart operation """ logger.info("Restarting Home Assistant") return await restart_home_assistant()
- app/hass.py:437-440 (helper)Helper function that performs the actual restart by calling Home Assistant's 'homeassistant.restart' service via the call_service utility.async def restart_home_assistant() -> Dict[str, Any]: """Restart Home Assistant""" return await call_service("homeassistant", "restart", {})
- app/server.py:866-866 (registration)MCP tool registration decorator applied to the restart_ha handler.@mcp.tool()