Fix demo stub

This commit is contained in:
Paulus Schoutsen 2019-03-14 15:38:33 -07:00
parent 4ff2d941c3
commit 9fc8c0764c
2 changed files with 9 additions and 0 deletions

View File

@ -15,6 +15,7 @@ import { mockTemplate } from "./stubs/template";
import { mockEvents } from "./stubs/events";
import { mockMediaPlayer } from "./stubs/media_player";
import { HomeAssistant } from "../../src/types";
import { mockFrontend } from "./stubs/frontend";
class HaDemo extends HomeAssistantAppEl {
protected async _handleConnProm() {
@ -35,6 +36,7 @@ class HaDemo extends HomeAssistantAppEl {
mockTemplate(hass);
mockEvents(hass);
mockMediaPlayer(hass);
mockFrontend(hass);
selectedDemoConfig.then((conf) => {
hass.addEntities(conf.entities());
if (conf.theme) {

View File

@ -0,0 +1,7 @@
import { MockHomeAssistant } from "../../../src/fake_data/provide_hass";
export const mockFrontend = (hass: MockHomeAssistant) => {
hass.mockWS("frontend/get_user_data", () => ({
value: null,
}));
};