Skip to content

Commit ea4303b

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

File tree

1 file changed

+6
-13
lines changed

1 file changed

+6
-13
lines changed

dist/fast-search-card.js

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9143,23 +9143,16 @@ class FastSearchCard extends HTMLElement {
91439143
const timeString = future.toTimeString().slice(0, 5);
91449144

91459145
console.log(`🕐 Neue Timer-Zeit: ${timeString}`);
9146-
console.log(`📋 Aktuelle Timer-Daten:`, currentTimer);
91479146

9148-
// KORRIGIERT: Nur die schedule_id verwenden, nicht als Entity
9149-
const updateData = {
9150-
schedule_id: timerId, // ← Korrigiert: Nicht entity_id
9147+
// KORRIGIERT: Scheduler edit erwartet nur timeslots und name
9148+
await this._hass.callService('scheduler', 'edit', {
9149+
entity_id: timerId, // ← Nur die ID, nicht schedule.id
91519150
timeslots: [{
91529151
start: timeString,
91539152
actions: currentTimer.timeslots[0].actions
91549153
}],
9155-
repeat_type: currentTimer.repeat_type || 'single',
91569154
name: currentTimer.name
9157-
};
9158-
9159-
console.log(`🔧 Update-Daten:`, updateData);
9160-
9161-
// Timer aktualisieren
9162-
await this._hass.callService('scheduler', 'edit', updateData);
9155+
});
91639156

91649157
console.log(`✅ Timer ${timerId} erfolgreich aktualisiert`);
91659158

@@ -9852,9 +9845,9 @@ class FastSearchCard extends HTMLElement {
98529845
try {
98539846
console.log(`🗑️ Timer löschen: ${timerId}`);
98549847

9855-
// KORRIGIERT: Verwende schedule_id statt entity_id
9848+
// KORRIGIERT: Scheduler remove erwartet nur entity_id
98569849
await this._hass.callService('scheduler', 'remove', {
9857-
schedule_id: timerId // ← Korrigiert: schedule_id statt entity_id
9850+
entity_id: timerId // ← Nur die Timer-ID
98589851
});
98599852

98609853
console.log(`✅ Timer ${timerId} erfolgreich gelöscht`);

0 commit comments

Comments
 (0)