From d43d19190e0573ed7b54ae563c97e603ea22b9b3 Mon Sep 17 00:00:00 2001 From: Bram Kragten Date: Fri, 3 Dec 2021 18:04:50 +0100 Subject: [PATCH] Fix entity marker (#10787) --- src/components/map/ha-entity-marker.ts | 13 +++++++------ src/components/map/ha-map.ts | 4 +++- src/panels/lovelace/cards/hui-map-card.ts | 1 - 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/src/components/map/ha-entity-marker.ts b/src/components/map/ha-entity-marker.ts index b917c29259..3524c52a21 100644 --- a/src/components/map/ha-entity-marker.ts +++ b/src/components/map/ha-entity-marker.ts @@ -2,11 +2,8 @@ import { LitElement, html, css } from "lit"; import { property } from "lit/decorators"; import { styleMap } from "lit/directives/style-map"; import { fireEvent } from "../../common/dom/fire_event"; -import { HomeAssistant } from "../../types"; class HaEntityMarker extends LitElement { - @property({ attribute: false }) public hass!: HomeAssistant; - @property({ attribute: "entity-id" }) public entityId?: string; @property({ attribute: "entity-name" }) public entityName?: string; @@ -26,9 +23,7 @@ class HaEntityMarker extends LitElement { ? html`
` : this.entityName} @@ -69,3 +64,9 @@ class HaEntityMarker extends LitElement { } customElements.define("ha-entity-marker", HaEntityMarker); + +declare global { + interface HTMLElementTagNameMap { + "ha-entity-marker": HaEntityMarker; + } +} diff --git a/src/components/map/ha-map.ts b/src/components/map/ha-map.ts index 2835ebb2fc..9e56fa7379 100644 --- a/src/components/map/ha-map.ts +++ b/src/components/map/ha-map.ts @@ -412,7 +412,9 @@ export class HaMap extends ReactiveElement {