Skip to content

Commit cd9747e

Browse files
authored
Update fast-search-card.js
1 parent 1e3a154 commit cd9747e

File tree

1 file changed

+30
-6
lines changed

1 file changed

+30
-6
lines changed

dist/fast-search-card.js

Lines changed: 30 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9724,23 +9724,47 @@ class FastSearchCard extends HTMLElement {
97249724
return;
97259725
}
97269726

9727+
// Debug: Schauen welche Container verfügbar sind
9728+
console.log('🔍 DEBUG: Suche Container für entityId:', entityId);
9729+
9730+
// Verschiedene Container-Selektoren probieren
9731+
let parentContainer = this.shadowRoot.querySelector(`#timer-section-${entityId}`);
9732+
9733+
if (!parentContainer) {
9734+
console.log('🔍 timer-section nicht gefunden, probiere shortcuts-tab-content...');
9735+
parentContainer = this.shadowRoot.querySelector('.shortcuts-tab-content.active');
9736+
}
9737+
9738+
if (!parentContainer) {
9739+
console.log('🔍 shortcuts-tab-content nicht gefunden, probiere timer-control...');
9740+
parentContainer = this.shadowRoot.querySelector(`#timer-control-${entityId}`);
9741+
}
9742+
9743+
if (!parentContainer) {
9744+
console.log('🔍 Alle verfügbaren Container:');
9745+
const allContainers = this.shadowRoot.querySelectorAll('[id*="timer"]');
9746+
allContainers.forEach(c => console.log('- Container:', c.id, c));
9747+
9748+
console.error('❌ Kein geeigneter Container gefunden!');
9749+
return;
9750+
}
9751+
9752+
console.log('✅ Container gefunden:', parentContainer);
9753+
97279754
// Edit-Modus setzen
97289755
this.editingTimer = {
97299756
id: timerId,
97309757
action: timer.action || 'turn_off',
97319758
entityId: entityId
97329759
};
97339760

9734-
// KORRIGIERT: Container als OBJEKT übergeben, nicht als entityId
9735-
const parentContainer = this.shadowRoot.querySelector(`#timer-section-${entityId}`);
9736-
9737-
// KORRIGIERT: Verwende ITEM-Objekt statt Container
9761+
// Item-Objekt für Time Picker
97389762
const itemObj = {
97399763
id: entityId,
9740-
name: 'Timer Edit' // Dummy-Objekt für Time Picker
9764+
name: 'Timer Edit'
97419765
};
97429766

9743-
// Bestehenden Minimal Time Picker anzeigen
9767+
// Time Picker anzeigen
97449768
this.showMinimalTimePicker(itemObj, timer.action || 'turn_off', parentContainer, false);
97459769

97469770
} catch (error) {

0 commit comments

Comments
 (0)