From 992d513e92cbf641466c6e2f770a6e7084a9d20b Mon Sep 17 00:00:00 2001 From: Carl Date: Sun, 16 Jun 2024 20:26:18 +0100 Subject: [PATCH] Fallback to try and grab first entity if no focusedEntity has been provided is no longer required. --- src/components/MapCard.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/MapCard.js b/src/components/MapCard.js index 760528c..6b8ed1d 100644 --- a/src/components/MapCard.js +++ b/src/components/MapCard.js @@ -348,7 +348,7 @@ export default class MapCard extends LitElement { /** @returns {[number, number]} latitude & longitude */ _getLatLongFromFocusedEntity() { - const entityId = this._config.focusEntity ? this._config.focusEntity : this._config.entities[0].id; + const entityId = this._config.focusEntity; const entity = this.hass.states[entityId]; if (!entity) {