# La box "Continuer seulement si" devrait proposer les valeurs instantanée des appareils par défaut

**URL:** <https://community.gladysassistant.com/t/la-box-continuer-seulement-si-devrait-proposer-les-valeurs-instantanee-des-appareils-par-defaut/6502>\
**Category:** Demande de fonctionnalités\
**Tags:** feature-core, scene, scene-action, in-progress\
**Created:** [Septembre 6, 2021, 1:08 UTC](https://community.gladysassistant.com/t/la-box-continuer-seulement-si-devrait-proposer-les-valeurs-instantanee-des-appareils-par-defaut/6502 "2021-09-06T01:08:19Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![pierre-gilles](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/pierre-gilles/32/5886_2.png) [@pierre-gilles](https://community.gladysassistant.com/u/pierre-gilles)\
**Post date:** [Septembre 6, 2021, 1:08 UTC](https://community.gladysassistant.com/t/la-box-continuer-seulement-si-devrait-proposer-les-valeurs-instantanee-des-appareils-par-defaut/6502/1 "2021-09-06T01:08:20Z")

</div>

En plus de laisser la possibilité de comparer des variables créé précédemment, laisser la possibilité de prendre une valeur instantanée sans devoir à créer une action «&nbsp;get device value&nbsp;»

Demandée ici:

> [@Retours et demandes en vrac](https://community.gladysassistant.com/t/retours-et-demandes-en-vrac/6474/10):
>
> Demande créée:

---

<div class="post-metadata">

**Author:** ![guim31](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/guim31/32/4840_2.png) [@guim31](https://community.gladysassistant.com/u/guim31)\
**Post date:** [Novembre 2, 2023, 8:03 UTC](https://community.gladysassistant.com/t/la-box-continuer-seulement-si-devrait-proposer-les-valeurs-instantanee-des-appareils-par-defaut/6502/2 "2023-11-02T08:03:33Z")

</div>

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 !! 🙂

---

<div class="post-metadata">

**Author:** ![lmilcent](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/lmilcent/32/7023_2.png) [@lmilcent](https://community.gladysassistant.com/u/lmilcent)\
**Post date:** [Novembre 2, 2023, 8:04 UTC](https://community.gladysassistant.com/t/la-box-continuer-seulement-si-devrait-proposer-les-valeurs-instantanee-des-appareils-par-defaut/6502/3 "2023-11-02T08:04:12Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![guim31](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/guim31/32/4840_2.png) [@guim31](https://community.gladysassistant.com/u/guim31)\
**Post date:** [Novembre 2, 2023, 8:06 UTC](https://community.gladysassistant.com/t/la-box-continuer-seulement-si-devrait-proposer-les-valeurs-instantanee-des-appareils-par-defaut/6502/4 "2023-11-02T08:06:06Z")

</div>

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 !

---

<div class="post-metadata">

**Author:** ![Hizo](https://gladys-assistant-community.b-cdn.net/letter_avatar_proxy/v4/letter/h/51bf81/32.png) [@Hizo](https://community.gladysassistant.com/u/Hizo)\
**Post date:** [Décembre 29, 2023, 12:45 UTC](https://community.gladysassistant.com/t/la-box-continuer-seulement-si-devrait-proposer-les-valeurs-instantanee-des-appareils-par-defaut/6502/5 "2023-12-29T12:45:06Z")

</div>

Petit up de cette super demande 😛

---

<div class="post-metadata">

**Author:** ![guim31](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/guim31/32/4840_2.png) [@guim31](https://community.gladysassistant.com/u/guim31)\
**Post date:** [Août 16, 2026, 3:37 UTC](https://community.gladysassistant.com/t/la-box-continuer-seulement-si-devrait-proposer-les-valeurs-instantanee-des-appareils-par-defaut/6502/6 "2026-08-16T15:37:19Z")

</div>

Je remonte ça… Pour moi c’est must have !

---

<div class="post-metadata">

**Author:** ![Chris75](https://gladys-assistant-community.b-cdn.net/letter_avatar_proxy/v4/letter/c/6a8cbe/32.png) [@Chris75](https://community.gladysassistant.com/u/Chris75)\
**Post date:** [Août 16, 2026, 4:07 UTC](https://community.gladysassistant.com/t/la-box-continuer-seulement-si-devrait-proposer-les-valeurs-instantanee-des-appareils-par-defaut/6502/7 "2026-08-16T16:07:20Z")

</div>

@guim31 elle se trouve où cette box "continuer seulement si " ?

---

<div class="post-metadata">

**Author:** ![mutmut](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/mutmut/32/14064_2.png) [@mutmut](https://community.gladysassistant.com/u/mutmut)\
**Post date:** [Août 16, 2026, 4:35 UTC](https://community.gladysassistant.com/t/la-box-continuer-seulement-si-devrait-proposer-les-valeurs-instantanee-des-appareils-par-defaut/6502/8 "2026-08-16T16:35:38Z")

</div>

Si je ne me trompe pas, elle n’existe plus car on a le `Si...Alors...Sinon` qui la remplace.

@pierre-gilles tu confirmes ?  
Et dans l’affirmative on peut fermer ce sujet.

---

<div class="post-metadata">

**Author:** ![StephaneB](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/stephaneb/32/15443_2.png) [@StephaneB](https://community.gladysassistant.com/u/StephaneB)\
**Post date:** [Août 16, 2026, 5:04 UTC](https://community.gladysassistant.com/t/la-box-continuer-seulement-si-devrait-proposer-les-valeurs-instantanee-des-appareils-par-defaut/6502/9 "2026-08-16T17:04:10Z")

</div>

@pierre-gilles je fais remonter cette demande en vue de la semaine prochaine. Simplement à noter que la box ‹&nbsp;continuer seulement si&nbsp;› est celle qui a été renommée en ‹&nbsp;condition sur variable&nbsp;›.

---

<div class="post-metadata">

**Author:** ![Chris75](https://gladys-assistant-community.b-cdn.net/letter_avatar_proxy/v4/letter/c/6a8cbe/32.png) [@Chris75](https://community.gladysassistant.com/u/Chris75)\
**Post date:** [Août 16, 2026, 5:09 UTC](https://community.gladysassistant.com/t/la-box-continuer-seulement-si-devrait-proposer-les-valeurs-instantanee-des-appareils-par-defaut/6502/10 "2026-08-16T17:09:27Z")

</div>

> [@StephaneB](#):
>
> la box ‹ continuer seulement si › est celle qui a été renommée en ‹ condition sur variable

ok, merci !

---

<div class="post-metadata">

**Author:** ![cursor-bot](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/cursor-bot/32/22252_2.png) [@cursor-bot](https://community.gladysassistant.com/u/cursor-bot)\
**Post date:** [Août 17, 2026, 12:09 UTC](https://community.gladysassistant.com/t/la-box-continuer-seulement-si-devrait-proposer-les-valeurs-instantanee-des-appareils-par-defaut/6502/11 "2026-08-17T12:09:54Z")

</div>

Salut tout le monde !

Ce sujet est désormais **en cours de développement**.

Une PR a été ouverte pour proposer les valeurs instantanées des appareils dans « Continuer seulement si » :

> <https://github.com/GladysAssistant/Gladys/pull/2707>
>
> \### 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.

N’hésitez pas à suivre la PR, à tester dès que possible et à faire vos retours ici.
