diff --git a/homeassistant/components/hassio/__init__.py b/homeassistant/components/hassio/__init__.py index 8a831fb790e..9604507fcf0 100644 --- a/homeassistant/components/hassio/__init__.py +++ b/homeassistant/components/hassio/__init__.py @@ -169,6 +169,17 @@ async def async_start_addon(hass: HomeAssistantType, slug: str) -> None: await hassio.send_command(command) +@bind_hass +async def async_stop_addon(hass: HomeAssistantType, slug: str) -> None: + """Stop add-on. + + The caller of the function should handle HassioAPIError. + """ + hassio = hass.data[DOMAIN] + command = f"/addons/{slug}/stop" + await hassio.send_command(command) + + @callback @bind_hass def get_info(hass):