1
0
mirror of https://github.com/home-assistant/frontend.git synced 2026-05-08 17:28:46 +01:00

Fix _initialize (#9206)

* Fix _initialize

* Update ha-demo.ts
This commit is contained in:
Bram Kragten
2021-05-19 00:11:24 +02:00
committed by GitHub
parent 1b9286db76
commit 52087c0e30
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -33,10 +33,10 @@ class HcDemo extends HassElement {
protected firstUpdated(changedProps) {
super.firstUpdated(changedProps);
this._initialize();
this._initializeHass();
}
private async _initialize() {
private async _initializeHass() {
const initial: Partial<MockHomeAssistant> = {
// Override updateHass so that the correct hass lifecycle methods are called
updateHass: (hassUpdate: Partial<HomeAssistant>) =>
+2 -2
View File
@@ -22,9 +22,9 @@ import { mockTemplate } from "./stubs/template";
import { mockTranslations } from "./stubs/translations";
class HaDemo extends HomeAssistantAppEl {
protected async _initialize() {
protected async _initializeHass() {
const initial: Partial<MockHomeAssistant> = {
panelUrl: (this as any).panelUrl,
panelUrl: (this as any)._panelUrl,
// Override updateHass so that the correct hass lifecycle methods are called
updateHass: (hassUpdate: Partial<HomeAssistant>) =>
this._updateHass(hassUpdate),