mirror of
https://github.com/home-assistant/core.git
synced 2025-04-28 11:17:53 +00:00
Add supervisor helper to start add-on (#40495)
This commit is contained in:
parent
40d003eccf
commit
ccff7f97cb
@ -158,6 +158,17 @@ async def async_uninstall_addon(hass: HomeAssistantType, slug: str) -> None:
|
|||||||
await hassio.send_command(command)
|
await hassio.send_command(command)
|
||||||
|
|
||||||
|
|
||||||
|
@bind_hass
|
||||||
|
async def async_start_addon(hass: HomeAssistantType, slug: str) -> None:
|
||||||
|
"""Start add-on.
|
||||||
|
|
||||||
|
The caller of the function should handle HassioAPIError.
|
||||||
|
"""
|
||||||
|
hassio = hass.data[DOMAIN]
|
||||||
|
command = f"/addons/{slug}/start"
|
||||||
|
await hassio.send_command(command)
|
||||||
|
|
||||||
|
|
||||||
@callback
|
@callback
|
||||||
@bind_hass
|
@bind_hass
|
||||||
def get_info(hass):
|
def get_info(hass):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user