Add supervisor add-on uninstall helper (#40413)
This commit is contained in:
parent
31ece55c57
commit
1d7754f160
1 changed files with 11 additions and 0 deletions
|
@ -147,6 +147,17 @@ async def async_install_addon(hass: HomeAssistantType, slug: str) -> None:
|
|||
await hassio.send_command(command)
|
||||
|
||||
|
||||
@bind_hass
|
||||
async def async_uninstall_addon(hass: HomeAssistantType, slug: str) -> None:
|
||||
"""Uninstall add-on.
|
||||
|
||||
The caller of the function should handle HassioAPIError.
|
||||
"""
|
||||
hassio = hass.data[DOMAIN]
|
||||
command = f"/addons/{slug}/uninstall"
|
||||
await hassio.send_command(command)
|
||||
|
||||
|
||||
@callback
|
||||
@bind_hass
|
||||
def get_info(hass):
|
||||
|
|
Loading…
Add table
Reference in a new issue