restart_ha
Restart Home Assistant to temporarily halt operations and refresh the system, returning the status of the restart 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-879 (handler)The primary handler function for the 'restart_ha' MCP tool. Registered via @mcp.tool() decorator. Logs the action and delegates to the restart_home_assistant helper function.@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)Supporting helper function that performs the actual Home Assistant service call to restart the instance via the 'homeassistant.restart' service.async def restart_home_assistant() -> Dict[str, Any]: """Restart Home Assistant""" return await call_service("homeassistant", "restart", {})