Zusätzlich zur Möglichkeit, zuvor erstellte Variablen zu vergleichen, sollte die Möglichkeit bestehen, einen Momentanwert zu übernehmen, ohne eine Aktion „Gerätewert abrufen“ erstellen zu müssen.
Hier angefragt:
guim31
2. November 2023 um 08:03
2
Je n’avais jamais vu cette demande, et je trouve qu’elle est en fait très importante pour faciliter la création de scènes > donc aider les gens à se projeter dans l’utilisation de Gladys !!
Totalement d’accord avec toi @guim31 , ça participe largement à rendre plus simple la création de scènes quand on a pas encore d’expérience.
guim31
2. November 2023 um 08:06
4
De mon retour d’expérience, je pense que la gestion / création des scènes est l’élément qui m’a demandé le plus de temps d’apprentissage.
Donc je pense que vu la philosophie du projet qui se veut facile d’accès, toute simplification à ce niveau là sera bénéfique !
Hizo
29. Dezember 2023 um 12:45
5
Petit up de cette super demande
guim31
16. August 2026 um 15:37
6
Ich bringe das wieder hoch… Für mich ist das ein Muss!
@guim31 Wo befindet sich diese Box „Nur fortfahren, wenn“?
mutmut
16. August 2026 um 16:35
8
Wenn ich mich nicht irre, gibt es sie nicht mehr, denn es gibt das Wenn...Dann...Sonst, das sie ersetzt hat.
@pierre-gilles kannst du das bestätigen?
Und falls ja, können wir dieses Thema schließen.
@pierre-gilles ich bringe diese Anforderung für die nächste Woche wieder nach oben. Einfach zu beachten, dass die Box ‹ nur fortsetzen, wenn › in ‹ Bedingung für Variable › umbenannt wurde.
Hallo zusammen!
Dieses Thema ist nun in Entwicklung .
Ein PR wurde eröffnet, um die Momentanwerte der Geräte in „Nur fortsetzen, wenn“ vorzuschlagen:
master ← claude/box-continuer-seulement-si-devu3t
ouvert 06:43PM - 23 Jul 26 UTC
### Pull Request check-list
To ensure your Pull Request can be accepted as fast… as possible, make sure to review and check all of these items:
- [x] If your changes affect the code, did you write the tests?
- [x] Are server tests passing with coverage? (`cd server && npm run coverage`) — Codecov requires **100% coverage on lines changed in this PR** (all scene, MCP and controller test suites pass locally; the new `device_feature` branches in `scene.actions.js` are each covered by a dedicated test)
- [ ] Did Cypress E2E tests pass? (`npm run cypress:run` from repo root, if UI changed) — no existing Cypress coverage for the "Only continue if" box
- [x] Is the linter passing? (`npm run eslint` on both front/server)
- [x] Did you run prettier? (`npm run prettier` on both front/server)
- [x] If you are adding a new feature/service, did you run the integration comparator? (`npm run compare-translations` on front) — only existing keys were modified, in all three languages (fr/en/de)
- [ ] Did you test this pull request in real life? With real devices? — not yet, community testing via the preview Docker image is welcome
- [x] If your changes modify the API (REST or Node.js), did you modify the API documentation? (Documentation is based on comments in code) — no REST API change; the MCP scene schema was updated accordingly
- [ ] If you are adding a new features/services which needs explanation, did you modify the user documentation? — the scene documentation on the website should be updated to mention that device values are now available directly in conditions
- [x] Did you add fake requests data for the demo mode (`front/src/config/demo.js`) so that the demo website is working without a backend? (if needed) — the condition select reuses the existing `/api/v1/room?expand=devices` and `/api/v1/device` routes already mocked for the demo
### Description of change
Implements the community feature request [La box "Continuer seulement si" devrait proposer les valeurs instantanées des appareils par défaut](``https://community.gladysassistant.com/t/la-box-continuer-seulement-si-devrait-proposer-les-valeurs-instantanee-des-appareils-par-defaut/6502``) (opened in 2021, bumped several times since).
Until now, the "Only continue if" box only offered scene variables created by previous blocks, so comparing a device's current state required adding a "Get device value" block first — a common stumbling block for newcomers building their first scenes.
**Server** (`scene.actions.js`, `models/scene.js`, MCP `sceneSchemas.js`):
- A condition now accepts a `device_feature` selector as an alternative to a scope `variable`. The feature's instantaneous value is resolved from the state manager at evaluation time (`last_value`, or `last_value_string` for text features, mirroring the front's `DeviceFeatureTypesString` logic).
- If the selector doesn't resolve, the scene aborts with `DEVICE_FEATURE_NOT_FOUND`, consistent with existing `AbortScene` codes.
- The Joi schema enforces exactly one of `variable` / `device_feature` (`xor`), so existing scenes remain valid unchanged. The MCP Zod schema accepts both forms with the same exclusivity rule.
**Front** (`OnlyContinueIfParams.jsx`, `Condition.jsx`, i18n fr/en/de):
- The condition select now lists all device features grouped by room (same data source as `SelectDeviceFeature`), after the scene-variable groups from previous blocks. With no prior "Get device value" block, devices are proposed by default — which is the exact ask of the topic.
- The selection stores `condition.device_feature` or `condition.variable` depending on the chosen option, and re-selects correctly when reopening the scene.
- Label renamed to "Device or variable" and the explanation text updated in all three languages.
Since the "If/Then/Else" box reuses the same component and the same server handler for its `if` conditions, it benefits from this automatically.
**Tests**: 4 new server tests cover the `device_feature` path (numeric condition verified/not verified, text feature, unknown feature). Full scene (232), MCP (92) and scene controller/model (15) suites pass.
## Summary by CodeRabbit
* **New Features**
* Scene conditions can now compare values directly from devices or scene variables.
* Device features are available as selectable, room-organized options in the scene editor.
* Numeric and text device values are supported for condition checks.
* **Bug Fixes**
* Improved validation ensures each condition references exactly one device feature or variable.
* Missing device features now produce a clear condition error.
* Updated English, German, and French guidance for configuring scene conditions.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_01MqXp8m7ZvLenVXiBuhsqqS
## Summary by CodeRabbit
* **New Features**
* Scene conditions can compare values directly from devices or scene variables.
* Device feature options are available in the condition editor, organized and grouped by room.
* Supports comparisons using current numeric or text device values.
* **Bug Fixes**
* Improved condition validation and handling when selecting devices or variables.
* Clear errors are shown when a referenced device feature is missing or unavailable.
* Device references in nested scene conditions are updated during migrations.
* **Documentation**
* Updated English, German, and French descriptions to explain device and variable comparisons.
Zögert nicht, dem PR zu folgen, es so früh wie möglich zu testen und euer Feedback hier zu hinterlassen.