Skip to content

Commit

Permalink
Fallback to try and grab first entity if no focusedEntity has been pr…
Browse files Browse the repository at this point in the history
…ovided is no longer required.
  • Loading branch information
thybag committed Jun 16, 2024
1 parent 626c3d6 commit 992d513
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/MapCard.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 992d513

Please sign in to comment.