Fix refreshing cloud prefs after changing Google prefs (#3240)
This commit is contained in:
parent
1eee186e79
commit
ffd272d3fe
@ -249,7 +249,7 @@ class CloudGoogleAssistant extends LitElement {
|
||||
// Cache parent because by the time popstate happens,
|
||||
// this element is detached
|
||||
const parent = this.parentElement!;
|
||||
this.addEventListener(
|
||||
window.addEventListener(
|
||||
"popstate",
|
||||
() => fireEvent(parent, "ha-refresh-cloud-status"),
|
||||
{ once: true }
|
||||
|
||||
@ -6,6 +6,13 @@ import { CloudStatus, fetchCloudStatus } from "../../data/cloud";
|
||||
import { listenMediaQuery } from "../../common/dom/media_query";
|
||||
import { HassRouterPage, RouterOptions } from "../../layouts/hass-router-page";
|
||||
|
||||
declare global {
|
||||
// for fire event
|
||||
interface HASSDomEvents {
|
||||
"ha-refresh-cloud-status": undefined;
|
||||
}
|
||||
}
|
||||
|
||||
@customElement("ha-panel-config")
|
||||
class HaPanelConfig extends HassRouterPage {
|
||||
@property() public hass!: HomeAssistant;
|
||||
|
||||
@ -30,7 +30,6 @@ declare global {
|
||||
"hass-logout": undefined;
|
||||
"iron-resize": undefined;
|
||||
"config-refresh": undefined;
|
||||
"ha-refresh-cloud-status": undefined;
|
||||
"hass-api-called": {
|
||||
success: boolean;
|
||||
response: unknown;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user