diff --git a/gallery/src/demos/demo-hui-gauge-card.ts b/gallery/src/demos/demo-hui-gauge-card.ts
index 6f9b4c4ac4..5f5e43644f 100644
--- a/gallery/src/demos/demo-hui-gauge-card.ts
+++ b/gallery/src/demos/demo-hui-gauge-card.ts
@@ -2,6 +2,19 @@ import { html } from "@polymer/polymer/lib/utils/html-tag";
import { PolymerElement } from "@polymer/polymer/polymer-element";
import "../components/demo-cards";
+import { getEntity } from "../../../src/fake_data/entity";
+import { provideHass } from "../../../src/fake_data/provide_hass";
+
+const ENTITIES = [
+ getEntity("sensor", "brightness", "12", {}),
+ getEntity("plant", "bonsai", "ok", {}),
+ getEntity("sensor", "outside_humidity", "54", {
+ unit_of_measurement: "%",
+ }),
+ getEntity("sensor", "outside_temperature", "15.6", {
+ unit_of_measurement: "°C",
+ }),
+];
const CONFIGS = [
{
@@ -66,7 +79,7 @@ const CONFIGS = [
class DemoGaugeEntity extends PolymerElement {
static get template() {
return html`
-
+
`;
}
@@ -78,6 +91,12 @@ class DemoGaugeEntity extends PolymerElement {
},
};
}
+
+ public ready() {
+ super.ready();
+ const hass = provideHass(this.$.demos);
+ hass.addEntities(ENTITIES);
+ }
}
customElements.define("demo-hui-gauge-card", DemoGaugeEntity);