diff --git a/homeassistant/components/hassio/__init__.py b/homeassistant/components/hassio/__init__.py index d391817f964..419e6865b69 100644 --- a/homeassistant/components/hassio/__init__.py +++ b/homeassistant/components/hassio/__init__.py @@ -222,6 +222,18 @@ async def async_start_addon(hass: HomeAssistant, slug: str) -> dict: return await hassio.send_command(command, timeout=60) +@bind_hass +@api_data +async def async_restart_addon(hass: HomeAssistant, slug: str) -> dict: + """Restart add-on. + + The caller of the function should handle HassioAPIError. + """ + hassio = hass.data[DOMAIN] + command = f"/addons/{slug}/restart" + return await hassio.send_command(command, timeout=None) + + @bind_hass @api_data async def async_stop_addon(hass: HomeAssistant, slug: str) -> dict: