Fix demo translations (#2511)
* Fix demo translations * Comment out some more panels * Fix reference
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user