Skip to content

Commit b624b68

Browse files
authored
Add files via upload
1 parent 1470918 commit b624b68

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

dist/fast-search-card.js

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

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

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
8946+
console.log(`🔧 Service: ${service}, Data:`, serviceData);
8947+
8948+
await this._hass.callService('scheduler', 'add', {
89518949
timeslots: [{
89528950
start: timeString,
89538951
actions: [{
89548952
service: service,
89558953
entity_id: item.id,
8956-
service_data: serviceData // <-- Jetzt wird es funktionieren!
8954+
service_data: serviceData
89578955
}]
89588956
}],
89598957
repeat_type: 'single',
89608958
name: `${item.name} - ${this.getActionLabel(action)} (${durationMinutes}min)`
89618959
});
89628960

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

89668964

0 commit comments

Comments
 (0)