feat: HA-Termine erstellen über calendar.create_event Service
- POST /api/homeassistant/events Endpoint mit calendar.create_event - Frontend: HA-Termine erstellen statt 'nicht unterstützt' Toast - Datetime-Format an HA-Konvention angepasst: 'YYYY-MM-DD HH:MM:SS' (Space-Separator, ohne Timezone) - _ha_format_dt Helper für ISO → HA Datetime-Konvertierung
This commit is contained in:
@@ -1460,8 +1460,12 @@ function bindEventModal() {
|
||||
});
|
||||
showToast(t('event_created'));
|
||||
} else if (isHA) {
|
||||
showToast(t('ha_create_not_supported'), true);
|
||||
return;
|
||||
const haCalId = parseInt(calVal.replace('homeassistant-', ''));
|
||||
await api.post('/homeassistant/events', {
|
||||
calendar_id: haCalId, title, start, end, allDay,
|
||||
location: loc, description: desc,
|
||||
});
|
||||
showToast(t('event_created'));
|
||||
} else {
|
||||
const calId = parseInt(calVal);
|
||||
await api.post('/caldav/events', {
|
||||
|
||||
Reference in New Issue
Block a user