From 0c7c536f73bc8c73aea8c2c3f89114bdd62b9551 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joakim=20S=C3=B8rensen?= Date: Mon, 7 Sep 2020 19:30:16 +0200 Subject: [PATCH] Fixes issues with channel toggle (#6812) --- hassio/src/system/hassio-supervisor-info.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hassio/src/system/hassio-supervisor-info.ts b/hassio/src/system/hassio-supervisor-info.ts index fd043751de..12af46d091 100644 --- a/hassio/src/system/hassio-supervisor-info.ts +++ b/hassio/src/system/hassio-supervisor-info.ts @@ -18,6 +18,7 @@ import { setSupervisorOption, SupervisorOptions, updateSupervisor, + fetchHassioSupervisorInfo, } from "../../../src/data/hassio/supervisor"; import { showAlertDialog, @@ -176,10 +177,11 @@ class HassioSupervisorInfo extends LitElement { try { const data: Partial = { - channel: this.supervisorInfo.channel !== "stable" ? "beta" : "stable", + channel: this.supervisorInfo.channel === "stable" ? "beta" : "stable", }; await setSupervisorOption(this.hass, data); await reloadSupervisor(this.hass); + this.supervisorInfo = await fetchHassioSupervisorInfo(this.hass); } catch (err) { showAlertDialog(this, { title: "Failed to set supervisor option", @@ -195,6 +197,7 @@ class HassioSupervisorInfo extends LitElement { try { await reloadSupervisor(this.hass); + this.supervisorInfo = await fetchHassioSupervisorInfo(this.hass); } catch (err) { showAlertDialog(this, { title: "Failed to reload the supervisor",