Skip to content

Commit 794f936

Browse files
authored
Update fast-search-card.js
1 parent be2105a commit 794f936

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

dist/fast-search-card.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4479,9 +4479,9 @@ class FastSearchCard extends HTMLElement {
44794479

44804480
let allEntityConfigs = [];
44814481

4482-
// 1. Auto-Discovery wenn aktiviert
4482+
// 1. Auto-Discovery wenn aktiviert (AWAIT HINZUGEFÜGT!)
44834483
if (this._config.auto_discover) {
4484-
const discoveredEntities = this.discoverEntities();
4484+
const discoveredEntities = await this.discoverEntities(); // ← AWAIT hinzugefügt!
44854485
allEntityConfigs = [...discoveredEntities];
44864486
console.log(`Auto-discovered: ${discoveredEntities.length} entities`);
44874487
}
@@ -4518,7 +4518,6 @@ class FastSearchCard extends HTMLElement {
45184518
if (entityConfig.domain === 'custom') {
45194519
return entityConfig;
45204520
}
4521-
45224521
// Regular HA entities
45234522
const entityId = entityConfig.entity;
45244523
const state = this._hass.states[entityId];
@@ -4861,7 +4860,7 @@ class FastSearchCard extends HTMLElement {
48614860
.trim();
48624861
}
48634862

4864-
discoverEntities() {
4863+
async discoverEntities() {
48654864
if (!this._hass) {
48664865
console.warn('HASS not available for auto-discovery');
48674866
return [];

0 commit comments

Comments
 (0)