Pouvoir disposer de la liste de tous les événements d’une date précisée. La valeur par défaut est le jour suivant.
Cas d’usage : création d’une scène déclenchée à un horaire précis (repas du soir), dans laquelle Gladys va renoncer l’ensemble des actions qui seront à réaliser le lendemain. La synthèse vocale utilise dans mon cas une API locale à qui on passe une phrase prononcée ensuite sur une enceinte ou un ensemble d’enceinte choisies. On peut imaginer passer à l’URL TTS une phrase comportant une variable qui regroupe les évènements (ou alors trouver un moyen de créer la phrase à la volée).
Hop c’est développé
master ← claude/calendar-events-request-8g4mo8
ouvert 01:55PM - 12 Aug 26 UTC
### Description
This PR adds a new scene action **`calendar.get-events`** ("Get… calendar events") that fetches the events of one or more shared calendars over a relative time range and exposes them as scene variables, so a scene can announce the day's or tomorrow's agenda through a message, a TTS notification or an HTTP request to a local TTS API.
**Time range options**: today, tomorrow (the forum request's default use case), or the next X hours.
**Variables injected in the scene scope** (`calendarEvents.*`):
- `text`: a ready-to-use localized sentence listing the events, e.g. `Dentist at 9:00 AM, Meeting at 4:00 PM` (full-day events are announced without a time, events starting on another day include the full date). The "at" word is localized (en/fr/de) using the calendar creator's language, consistent with how `calendar.event-is-coming` formats dates.
- `count`: number of events found.
- `events`: the raw sorted list (name, location, description, start, end, summary) for advanced templating.
The action can optionally **stop the scene when no event is found**, which also makes it usable as a condition in if/then/else blocks (e.g. "if there are events tomorrow → announce them"), consistent with `calendar.is-event-running`.
Implementation details:
- New `calendar.findEventsInRange(calendars, from, to)` lib function: events **starting** in the range, shared calendars only (same convention as `findCurrentlyRunningEvent` and the calendar trigger), sorted chronologically.
- New action handler in `scene.actions.js`, registered in `CONDITION_ACTIONS`.
- New front component `CalendarGetEvents` (modeled on `CalendarIsEventRunning`), translations added for en/fr/de.
- MCP scene schema added so AI-generated scenes can use the action.
- Server tests: 7 tests for the scene action (all time ranges, sorting, full-day events, events without end date, empty result, abort behavior, invalid range) and 3 tests for the lib function (range filter, sorting, shared-only, calendar filter).
## Forum
Forum: https://community.gladysassistant.com/t/calendrier-pouvoir-disposer-dune-liste-des-evenements-a-une-date-a-venir/10530
### Checklist
- [x] Tests pass: `cd server && npm run coverage` (Codecov requires 100% coverage on changed lines) and Cypress (`npm run cypress:run`) if the UI changed — targeted suites are green locally (scene: 252 ✓, MCP: 99 ✓, calendar: 39 ✓ including the 10 new tests); the only local full-suite failures are environment-related (missing `sqlite3` binary/Docker/network in the sandbox) in areas untouched by this PR. Cypress could not run in the sandbox (binary download blocked).
- [x] Linter and prettier pass on both front and server (`npm run eslint`, `npm run prettier`)
- [x] No undocumented breaking change
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_01ExXaNXP51WH4CJzCrXZkZt
---
_Generated by [Claude Code](https://claude.ai/code/session_01ExXaNXP51WH4CJzCrXZkZt)_
## Summary by CodeRabbit
* **New Features**
* Added a scene action to retrieve events from one or more shared calendars.
* Supports today, tomorrow, or customizable upcoming-hour ranges.
* Provides event summaries, counts, and event lists, with an option to stop when no events are found.
* Added configuration validation and English, French, and German translations.
* **Tests**
* Added coverage for date ranges, calendar selection, sorting, formatting, validation, and empty results.
Testé et approuvé, ça partira dans la prochaine version de Gladys
Je ferme ce post car la fonctionnalité est disponible dans Gladys Assistant 4.86 :
Salut à tous !
Super heureux de sortir Gladys Assistant 4.86.
C’est simple, c’est la plus grosse version depuis le début du projet, avec 68 PR fusionnées en une semaine
C’est juste incroyable, et ça montre le nouveau rythme qu’on peut tenir avec l’IA.
L’objectif est maintenant clair : rattraper et dépasser Home Assistant
Je vous parle de ces 68 nouveautés ici :
Merci à tous les contributeurs !!