Skip to content

Commit b0d20a1

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

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

dist/fast-search-card.js

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

91459145
console.log(`🕐 Neue Timer-Zeit: ${timeString}`);
9146+
console.log(`🔍 Current Timer:`, currentTimer);
9147+
9148+
// KORRIGIERT: Entity-ID Format schedule.{id}
9149+
const entityId = `schedule.${timerId}`;
9150+
console.log(`🔍 Using entity_id: ${entityId}`);
91469151

9147-
// KORRIGIERT: Scheduler edit erwartet nur timeslots und name
91489152
await this._hass.callService('scheduler', 'edit', {
9149-
entity_id: timerId, // ← Nur die ID, nicht schedule.id
9153+
entity_id: entityId, // ← schedule.{id} Format
91509154
timeslots: [{
91519155
start: timeString,
91529156
actions: currentTimer.timeslots[0].actions
@@ -9845,9 +9849,12 @@ class FastSearchCard extends HTMLElement {
98459849
try {
98469850
console.log(`🗑️ Timer löschen: ${timerId}`);
98479851

9848-
// KORRIGIERT: Scheduler remove erwartet nur entity_id
9852+
// KORRIGIERT: Entity-ID Format schedule.{id}
9853+
const scheduleEntityId = `schedule.${timerId}`;
9854+
console.log(`🔍 Lösche schedule entity: ${scheduleEntityId}`);
9855+
98499856
await this._hass.callService('scheduler', 'remove', {
9850-
entity_id: timerId // ← Nur die Timer-ID
9857+
entity_id: scheduleEntityId // ← schedule.{id} Format
98519858
});
98529859

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

0 commit comments

Comments
 (0)