Fix demo translations (#2511)

* Fix demo translations

* Comment out some more panels

* Fix reference
This commit is contained in:
Paulus Schoutsen
2019-01-20 11:24:39 -08:00
committed by GitHub
parent 69c10256ef
commit 3b66d58f91
15 changed files with 576 additions and 433 deletions
+1 -22
View File
@@ -2,11 +2,6 @@ import { html } from "@polymer/polymer/lib/utils/html-tag";
import { PolymerElement } from "@polymer/polymer/polymer-element";
import JsYaml from "js-yaml";
import HomeAssistant from "../data/hass";
import { demoConfig } from "../../../src/fake_data/demo_config";
import { demoServices } from "../../../src/fake_data/demo_services";
import demoResources from "../../../src/fake_data/demo_resources";
import demoStates from "../data/demo_states";
import { createCardElement } from "../../../src/panels/lovelace/common/create-card-element";
class DemoCard extends PolymerElement {
@@ -68,23 +63,7 @@ class DemoCard extends PolymerElement {
}
const el = createCardElement(JsYaml.safeLoad(config.config)[0]);
if (this.hass) {
el.hass = this.hass;
} else {
const hass = new HomeAssistant(demoStates);
hass.config = demoConfig;
hass.services = demoServices;
hass.resources = demoResources;
hass.language = "en";
hass.states = demoStates;
hass.themes = {
default_theme: "default",
themes: {},
};
el.hass = hass;
}
el.hass = this.hass;
card.appendChild(el);
}