mirror of
https://github.com/home-assistant/core.git
synced 2025-08-04 21:25:13 +02:00
Add supervisor add-on uninstall helper (#40413)
This commit is contained in:
@@ -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):
|
||||
|
Reference in New Issue
Block a user