diff --git a/src/components/entity/ha-entity-marker.js b/src/components/entity/ha-entity-marker.js index eac0d64ac4..b92c4e2161 100644 --- a/src/components/entity/ha-entity-marker.js +++ b/src/components/entity/ha-entity-marker.js @@ -2,6 +2,13 @@ import Polymer from '../../polymer'; require('../../components/ha-label-badge'); +/* +Leaflet clones this element before adding it to the map. This messes up +our Poylmer object and we lose the reference to the `hass` object. + +That's why we refer here to window.hass instead of the hass property. +*/ + export default new Polymer({ is: 'ha-entity-marker',