1
0
mirror of https://github.com/home-assistant/frontend.git synced 2026-04-20 00:40:21 +01:00

Adds dialog to ask user to restart add-on on configuration changes (#5707)

* Adds dialog to ask user to restart addon on configuration changes

* Apply review suggestions

* Show error in dialog

* Remove unused import

* Update hassio/src/dialogs/suggestRestart.ts

* Rename

Co-authored-by: Bram Kragten <mail@bramkragten.nl>
This commit is contained in:
Joakim Sørensen
2020-05-02 19:19:45 +02:00
committed by GitHub
parent bc68e20041
commit df8cf66e02
5 changed files with 57 additions and 0 deletions

View File

@@ -175,6 +175,13 @@ export const installHassioAddon = async (hass: HomeAssistant, slug: string) => {
);
};
export const restartHassioAddon = async (hass: HomeAssistant, slug: string) => {
return hass.callApi<HassioResponse<void>>(
"POST",
`hassio/addons/${slug}/restart`
);
};
export const uninstallHassioAddon = async (
hass: HomeAssistant,
slug: string