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:
Scarriffle
2026-04-29 19:07:02 +02:00
parent a700bc5350
commit d942b82e1d
2 changed files with 84 additions and 6 deletions

View File

@@ -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', {