Skip to content

Commit 705e1ca

Browse files
authored
Update fast-search-card.js
1 parent a8a9a1a commit 705e1ca

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

dist/fast-search-card.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -422,19 +422,27 @@ class FastSearchCard extends HTMLElement {
422422
const oldHass = this._hass;
423423
this._hass = hass;
424424

425+
console.log('🐛 DEBUG: set hass called');
426+
console.log('🐛 DEBUG: oldHass exists:', !!oldHass);
427+
console.log('🐛 DEBUG: user is admin:', hass.user?.is_admin);
428+
console.log('🐛 DEBUG: user info:', hass.user);
429+
425430
// NEU: Auto-Setup beim ersten Start (nur für Admins)
426431
if (!oldHass && hass && hass.user?.is_admin) {
432+
console.log('🐛 DEBUG: Taking ADMIN path');
427433
this.autoCreateUserLabels().then(() => {
428434
this.loadAllFavorites().then(() => {
429435
this.updateItems();
430436
});
431437
});
432438
} else if (!oldHass && hass) {
439+
console.log('🐛 DEBUG: Taking NORMAL USER path');
433440
// Normaler User - nur Favoriten laden
434441
this.loadAllFavorites().then(() => {
435442
this.updateItems();
436443
});
437444
} else {
445+
console.log('🐛 DEBUG: Taking ELSE path (no favorites loading)');
438446
const shouldUpdateAll = !oldHass || this.shouldUpdateItems(oldHass, hass);
439447
if (shouldUpdateAll) {
440448
this.updateItems();

0 commit comments

Comments
 (0)