mirror of
https://github.com/home-assistant/core.git
synced 2025-07-16 01:37:08 +00:00
Add supervisor add-on stop helper (#40501)
This commit is contained in:
parent
ccff7f97cb
commit
27c5594cda
@ -169,6 +169,17 @@ async def async_start_addon(hass: HomeAssistantType, slug: str) -> None:
|
|||||||
await hassio.send_command(command)
|
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
|
@callback
|
||||||
@bind_hass
|
@bind_hass
|
||||||
def get_info(hass):
|
def get_info(hass):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user