Skip to content

Commit e39c707

Browse files
authored
Update fast-search-card.js
1 parent 4019316 commit e39c707

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

dist/fast-search-card.js

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9145,14 +9145,13 @@ class FastSearchCard extends HTMLElement {
91459145
console.log(`🕐 Neue Timer-Zeit: ${timeString}`);
91469146
console.log(`📋 Aktuelle Timer-Daten:`, currentTimer);
91479147

9148-
// KORRIGIERT: Vollständige Timer-Daten mit actions übernehmen
9148+
// KORRIGIERT: Nur die schedule_id verwenden, nicht als Entity
91499149
const updateData = {
9150-
entity_id: `schedule.${timerId}`,
9150+
schedule_id: timerId, // ← Korrigiert: Nicht entity_id
91519151
timeslots: [{
91529152
start: timeString,
9153-
actions: currentTimer.timeslots[0].actions // ← Wichtig: actions beibehalten!
9153+
actions: currentTimer.timeslots[0].actions
91549154
}],
9155-
// Andere bestehende Eigenschaften beibehalten
91569155
repeat_type: currentTimer.repeat_type || 'single',
91579156
name: currentTimer.name
91589157
};
@@ -9162,7 +9161,7 @@ class FastSearchCard extends HTMLElement {
91629161
// Timer aktualisieren
91639162
await this._hass.callService('scheduler', 'edit', updateData);
91649163

9165-
console.log(`✅ Timer ${timerId} erfolgreich auf ${newTotalMinutes} Minuten aktualisiert`);
9164+
console.log(`✅ Timer ${timerId} erfolgreich aktualisiert`);
91669165

91679166
} catch (error) {
91689167
console.error('❌ Fehler beim Aktualisieren des Timers:', error);
@@ -9853,12 +9852,12 @@ class FastSearchCard extends HTMLElement {
98539852
try {
98549853
console.log(`🗑️ Timer löschen: ${timerId}`);
98559854

9856-
// Korrekte Service-Call für Timer-Löschung
9855+
// KORRIGIERT: Verwende schedule_id statt entity_id
98579856
await this._hass.callService('scheduler', 'remove', {
9858-
entity_id: timerId
9857+
schedule_id: timerId // ← Korrigiert: schedule_id statt entity_id
98599858
});
98609859

9861-
console.log('✅ Timer erfolgreich gelöscht');
9860+
console.log(`✅ Timer ${timerId} erfolgreich gelöscht`);
98629861

98639862
// Timer-Liste neu laden
98649863
setTimeout(() => {

0 commit comments

Comments
 (0)