Skip to content

Commit 1470918

Browse files
authored
Update fast-search-card.js
1 parent f821f62 commit 1470918

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

dist/fast-search-card.js

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8940,25 +8940,27 @@ class FastSearchCard extends HTMLElement {
89408940
const future = new Date(Date.now() + durationMinutes * 60 * 1000);
89418941
const timeString = future.toTimeString().slice(0, 5);
89428942

8943-
// Bestimme Service und Service Data basierend auf Action
8943+
// Dieser Teil ist und war immer korrekt
89448944
const { service, serviceData } = this.getActionServiceData(item, action);
89458945

8946-
console.log(`🔧 Service: ${service}, Data:`, serviceData);
8947-
8948-
await this._hass.callService('scheduler', 'add', {
8946+
// WICHTIG: Ersetzen Sie 'callService' durch 'callWS' und passen Sie die Struktur an
8947+
await this._hass.callWS({
8948+
type: 'scheduler/add', // <-- DER ENTSCHEIDENDE UNTERSCHIED: Direkte WebSocket-Nachricht
8949+
8950+
// Die restlichen Daten werden als Top-Level-Attribute übergeben
89498951
timeslots: [{
89508952
start: timeString,
89518953
actions: [{
89528954
service: service,
89538955
entity_id: item.id,
8954-
data: serviceData
8956+
service_data: serviceData // <-- Jetzt wird es funktionieren!
89558957
}]
89568958
}],
89578959
repeat_type: 'single',
89588960
name: `${item.name} - ${this.getActionLabel(action)} (${durationMinutes}min)`
89598961
});
89608962

8961-
console.log(`✅ Timer erfolgreich erstellt: ${service} in ${durationMinutes} Minuten`);
8963+
console.log(`✅ Timer via callWS erfolgreich erstellt!`);
89628964
}
89638965

89648966

0 commit comments

Comments
 (0)