# Scenes: Improve the "device state change" selection with filters and multi-select!

**URL:** <https://community.gladysassistant.com/t/scenes-ameliorer-la-selection-changement-detat-de-lappareil-avec-des-filtres-et-du-multi-select/8566>\
**Category:** Demandes livrées\
**Created:** [November 30, 2023, 1:53pm UTC](https://community.gladysassistant.com/t/scenes-ameliorer-la-selection-changement-detat-de-lappareil-avec-des-filtres-et-du-multi-select/8566 "2023-11-30T13:53:39Z")\
**Posts on this page:** 20\
**Page:** 1

<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:** [November 30, 2023, 1:53pm UTC](https://community.gladysassistant.com/t/scenes-ameliorer-la-selection-changement-detat-de-lappareil-avec-des-filtres-et-du-multi-select/8566/1 "2023-11-30T13:53:39Z")

</div>

# Feature description

Do you want to detect any movement in your home and trigger an action? It’s possible, but if you have 4 motion sensors, it currently takes 28 mouse clicks, which is a bit long and tedious.

What if we limited the dropdown list display to only what you want to select?  
What if you could select all devices at once?  
 → Well, that would be super convenient 🙂

### Explanations

Currently, selecting the 4 motion sensors to trigger a scene:

- 4 clicks to add a new trigger of type «&nbsp;Device state change&nbsp;»
- 2 clicks to select a first sensor of type ‹&nbsp;Motion (Yes/No)&nbsp;›
- 1 click to set «&nbsp;On&nbsp;» (motion)

Total: 7 clicks for a single motion sensor, so 28 clicks for 4 sensors.

And I’ll stop there, because if you want to retrieve the last value of each sensor, test it and then perform an action, it’s even longer.

### Proposal

When choosing a device from the list, add filters at the top of this list to limit it to sensor types or rooms of the house.

As a user, I want the list to be as precise as possible for my needs and to allow me to select all the sensors to be used in a single action.

Example I really like ([source](https://m3.material.io/components/chips/guidelines)) :

 ![unnamed](https://gladys-assistant-community.b-cdn.net/uploads/default/original/2X/8/8e6880edf704bfe7d4fb46912fb83d9ff3ff6c52.png)

  

* * *

### Versus currently

The list is veeeery long, even if I filter on «&nbsp;movement&nbsp;» for example, because each detector has a line for battery, signal strength, temperature, humidity, brightness and finally motion.

Example with an unfiltered selection:

 ![image](https://gladys-assistant-community.b-cdn.net/uploads/default/original/2X/4/4a80f285976c2694a61ba06132c47cfd5505ed81.png)

Another example with a selection filtered on «&nbsp;temperature&nbsp;»:

 ![image](https://gladys-assistant-community.b-cdn.net/uploads/default/original/2X/7/74318de72b79d98e26b56691e7ff8375a326e635.png)

---

<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:** [December 1, 2023, 12:47pm UTC](https://community.gladysassistant.com/t/scenes-ameliorer-la-selection-changement-detat-de-lappareil-avec-des-filtres-et-du-multi-select/8566/2 "2023-12-01T12:47:43Z")

</div>

I share the desire to simplify finding those select elements in scenes, because as soon as you have quite a few devices, you’re really dealing with HYPER long lists.

---

<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:** [January 27, 2025, 3:44pm UTC](https://community.gladysassistant.com/t/scenes-ameliorer-la-selection-changement-detat-de-lappareil-avec-des-filtres-et-du-multi-select/8566/3 "2025-01-27T15:44:37Z")

</div>

@pierre-gilles I don’t know if this can be included in the UX improvement project, but it seems relevant to me.

Creating a scene that has to check that all the windows are properly closed is always a pain (I have 8 openings, because the windows are double: right and left).

From a usability perspective, it would be life-changing.

---

<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:** [January 27, 2025, 4:29pm UTC](https://community.gladysassistant.com/t/scenes-ameliorer-la-selection-changement-detat-de-lappareil-avec-des-filtres-et-du-multi-select/8566/4 "2025-01-27T16:29:39Z")

</div>

I agree!

How do you see that for the filters? I’m having trouble picturing it.

If you could make a quick mockup on [https://whimsical.com/](https://whimsical.com/) 😃

---

<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:** [January 27, 2025, 7:53pm UTC](https://community.gladysassistant.com/t/scenes-ameliorer-la-selection-changement-detat-de-lappareil-avec-des-filtres-et-du-multi-select/8566/5 "2025-01-27T19:53:16Z")

</div>

Here is my proposal: [scenes-ameliorer-la-selection-du-choix-des-capteurs-avec-des-filtres-et-du-multi-select](https://whimsical.com/scenes-ameliorer-la-selection-du-choix-des-capteurs-avec-des-fil-S6EmeWxY38qTk8iRiCHQPx)

_Inspiration: Material Design 3_  
_⁠[Chips – Material Design 3](https://m3.material.io/components/chips/guidelines)_

# Trigger

Here, Gladys allows us to list all devices, filter by room or type, and select one or more.

Three filter modes: via the usual input, via the room input (like Gmail, adds «&nbsp;chips&nbsp;» once the tag is confirmed by pressing Enter), and via type.  
Filters should operate exclusively (type AND).

Validation can be direct (selecting everything validates at once) or indirect: you must select checkbox by checkbox then confirm (to be defined).

 ![image](https://gladys-assistant-community.b-cdn.net/uploads/default/original/3X/9/9/99132691eb0dfff7386319eaf1178e8624b0b650.png)

Once confirmed:

 ![image](https://gladys-assistant-community.b-cdn.net/uploads/default/original/3X/0/8/08d9a8b8759eb79f35b748c8e9f6d2cad173c291.png)

# Retrieve the latest state (same idea)

Same principle, the example mixes the types this time and does not filter by room:

 ![image](https://gladys-assistant-community.b-cdn.net/uploads/default/original/3X/9/a/9a90a5c6acd469cb161a969422daebab9cc6e3e6.png)

---

<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:** [January 27, 2025, 8:49pm UTC](https://community.gladysassistant.com/t/scenes-ameliorer-la-selection-changement-detat-de-lappareil-avec-des-filtres-et-du-multi-select/8566/6 "2025-01-27T20:49:46Z")

</div>

I really like this proposal! Well done @lmilcent

---

<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:** [January 28, 2025, 5:52am UTC](https://community.gladysassistant.com/t/scenes-ameliorer-la-selection-changement-detat-de-lappareil-avec-des-filtres-et-du-multi-select/8566/7 "2025-01-28T05:52:28Z")

</div>

I understand that this would be applied to triggers and to the «&nbsp;get last state&nbsp;» actions. Would it also be feasible in a similar way for the «&nbsp;control a device&nbsp;» actions?

---

<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:** [January 28, 2025, 4:48pm UTC](https://community.gladysassistant.com/t/scenes-ameliorer-la-selection-changement-detat-de-lappareil-avec-des-filtres-et-du-multi-select/8566/8 "2025-01-28T16:48:04Z")

</div>

In fact we’re moving toward a request for a global change to the selection of connected devices in Gladys.  
I believe this is indeed a point of friction in some use cases that we encounter frequently, but that it’s not a «&nbsp;quick win&nbsp;» because the work behind it is more substantial than fixing a few UX bugs (I imagine).

@pierre-gilles what’s your view on the matter and the proposal?

---

<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:** [January 28, 2025, 6:56pm UTC](https://community.gladysassistant.com/t/scenes-ameliorer-la-selection-changement-detat-de-lappareil-avec-des-filtres-et-du-multi-select/8566/9 "2025-01-28T18:56:29Z")

</div>

> [@lmilcent](#):
>
> Here is my proposal

Thanks for your proposal, it’s cool that you spent time on this 🙂

> [@lmilcent](#):
>
> via the usual input

Where is that on your mockup? I don’t see it

> [@lmilcent](#):
>
> Validation can be direct (selecting everything validates at once) or indirect: you have to check box by box then confirm (to be defined).

Why go with a checkbox system, instead of keeping the current [react-select](https://react-select.com/home) component?

The problem with checkboxes is that devices in Gladys number in the dozens/hundreds. Even with filters, the largest rooms easily have 20 devices. So to prevent it from overflowing, you’ll need to add scrolling inside. However, checkboxes inside a scrollable view are not great, because you can’t see the devices you’ve checked at the very bottom.

Otherwise, overall I like the proposal but I find it a bit heavy, don’t you think? And in terms of UI clarity, I’m not sure a newcomer who doesn’t know the product will understand that the room selector is a filter, same for the type.

> [@lmilcent](#):
>
> @pierre-gilles what’s your vision on the subject and the proposal?

I agree that this behavior could later be extended to other parts of Gladys, but I think that should be in a second phase, and in other feature requests.

My view is always the same: the smaller a feature request is in terms of scope, the better. Giant catch-all requests are projects that never get completed because the hurdle is too big!

We need to move forward in small iterations 🙂

---

<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:** [January 28, 2025, 7:06pm UTC](https://community.gladysassistant.com/t/scenes-ameliorer-la-selection-changement-detat-de-lappareil-avec-des-filtres-et-du-multi-select/8566/10 "2025-01-28T19:06:11Z")

</div>

> [@pierre-gilles](#):
>
> Where is it on your mockup? I don’t see it

It may not be explicit enough, but the `Select ...` is an input field, to keep everyone’s habits.

> [@pierre-gilles](#):
>
> Why use a checkbox system, and not keep the current [react-select](https://react-select.com/home) component?

Simply out of ignorance, I used the fields offered by Whimsical.

> [@pierre-gilles](#):
>
> Even with filters, the largest rooms easily have 20 devices. So to prevent overflow, you’ll need to add scrolling inside

Good point, I hadn’t thought of that and indeed it’s a UX disaster 😬

> [@pierre-gilles](#):
>
> Otherwise, generally about the proposal, I like it but I find it a bit heavy, no? And in terms of UI comprehension, I’m not sure that a newcomer who doesn’t know the product will understand that the room selector is a filter, same for the type

I wanted to give a general idea, a bit more concrete than words. But it’s not developed enough; like you, I find it looks very busy and almost intimidating for a newcomer.

Currently, when you look at the list and see the same sensor many times but with different types, I find it lacks simplicity.  
For my part, I often pre-filter by typing the type first (`ouverture`), but then I can no longer filter by room. And doing the reverse shows me too many results.

My proposal tried to limit that aspect a bit. With some redesign work, we’ll end up with something 🙂

---

<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:** [January 28, 2025, 7:16pm UTC](https://community.gladysassistant.com/t/scenes-ameliorer-la-selection-changement-detat-de-lappareil-avec-des-filtres-et-du-multi-select/8566/11 "2025-01-28T19:16:53Z")

</div>

> [@lmilcent](#):
>
> My proposal tried to limit that aspect a bit. With some redesign work, we’ll end up with something 🙂

Cool! Keep me posted as soon as you have a new version 🙂

---

<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:** [January 28, 2025, 8:10pm UTC](https://community.gladysassistant.com/t/scenes-ameliorer-la-selection-changement-detat-de-lappareil-avec-des-filtres-et-du-multi-select/8566/12 "2025-01-28T20:10:13Z")

</div>

> [@pierre-gilles](#):
>
> I agree that this behavior could later be extended to other places in Gladys, but I think that should be in a second phase, and in other feature requests.
> 
> My view is still the same: the smaller a feature request is in terms of scope, the better. Giant catch-all requests are projects that never come to fruition because the step is too big!

I also think it’s good to be aware that this UI improvement would be relevant in three places (triggers, state-retrieval action, device-control action), but to first define, develop and test it on only one of the three.

So it would be on the state-retrieval action that was your initial point in this thread, @lmilcent? If that’s the case, maybe state that clearly in the title…

---

<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:** [January 28, 2025, 9:23pm UTC](https://community.gladysassistant.com/t/scenes-ameliorer-la-selection-changement-detat-de-lappareil-avec-des-filtres-et-du-multi-select/8566/13 "2025-01-28T21:23:50Z")

</div>

It’s done, I’ve changed the title.

---

<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:** [February 10, 2025, 8:06am UTC](https://community.gladysassistant.com/t/scenes-ameliorer-la-selection-changement-detat-de-lappareil-avec-des-filtres-et-du-multi-select/8566/14 "2025-02-10T08:06:08Z")

</div>

Hi @lmilcent, I’m following up on this — have you had a chance to take a look?

---

<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:** [February 10, 2025, 10:32pm UTC](https://community.gladysassistant.com/t/scenes-ameliorer-la-selection-changement-detat-de-lappareil-avec-des-filtres-et-du-multi-select/8566/15 "2025-02-10T22:32:06Z")

</div>

I haven’t forgotten the topic; I just haven’t yet found the time or availability to get back to it.  
In the meantime, if others have suggestions, I’m open to them too ^^

---

<div class="post-metadata">

**Author:** ![system](https://gladys-assistant-community.b-cdn.net/uploads/default/original/2X/c/c0f34742e9b7a8079c938a0dc83cc19cbdf4208c.png) [@system](https://community.gladysassistant.com/u/system)\
**Post date:** [March 17, 2025, 7:00am UTC](https://community.gladysassistant.com/t/scenes-ameliorer-la-selection-changement-detat-de-lappareil-avec-des-filtres-et-du-multi-select/8566/16 "2025-03-17T07:00:46Z")

</div>



---

<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:** [March 17, 2025, 7:25am UTC](https://community.gladysassistant.com/t/scenes-ameliorer-la-selection-changement-detat-de-lappareil-avec-des-filtres-et-du-multi-select/8566/17 "2025-03-17T07:25:22Z")

</div>

Hi @lmilcent, just a quick follow-up in case you have time to take a look 🙂

---

<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:** [March 17, 2025, 1:53pm UTC](https://community.gladysassistant.com/t/scenes-ameliorer-la-selection-changement-detat-de-lappareil-avec-des-filtres-et-du-multi-select/8566/18 "2025-03-17T13:53:10Z")

</div>

Oh dear, oh dear, oh dear, time flies. I use the forum’s «&nbsp;Remind&nbsp;» function to always keep the topic in mind.

For now I’m a bit stuck on the design to combine practicality of use and visual ergonomics, but I keep digging around for inspiration and to come up with a new proposal.

In the meantime, don’t hesitate to share new proposals with me (the community, not just you 😉 ).

---

<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:** [August 14, 2026, 9:37am UTC](https://community.gladysassistant.com/t/scenes-ameliorer-la-selection-changement-detat-de-lappareil-avec-des-filtres-et-du-multi-select/8566/19 "2026-08-14T09:37:34Z")

</div>

It is now possible to select multiple devices in the trigger:

 ![Screenshot 2026-08-14 at 11.36.39](https://gladys-assistant-community.b-cdn.net/uploads/default/original/3X/e/5/e5dac79c9653ce7afe29914132cd4e91f55e8283.png)

> <https://github.com/GladysAssistant/Gladys/pull/2858>
>
> \### Description
> 
> The "device state change" trigger now accepts \*\*several device …features sharing a single condition\*\* (OR logic): the scene starts as soon as any of the selected features matches. Selecting 4 motion sensors now takes 1 trigger instead of 4.
> 
> The existing react-select component is kept, with three small changes:
> 
> \- \*\*Multi-select\*\*: the trigger's feature select is now \`isMulti\`; the single condition (operator/value, \`for\_duration\`, etc.) applies to every selected feature. Server-side, the trigger fires when the event's feature is in the new \`device\_features\` array, and each feature keeps its own independent \`for\_duration\` timer.
> \- \*\*Automatic filtering\*\*: once a first feature is picked, the list only offers features of the same category/type — a single condition only makes sense between comparable features, and as a side effect the huge all-features list shrinks to the relevant ones.
> \- \*\*Smarter search\*\*: the text search now matches room + device + feature with an implicit AND between words, ignoring case and accents, so typing "mouvement salon" finds the right row directly.
> 
> \*\*Backward compatibility\*\*: scenes saved with the legacy single \`device\_feature\` keep working unchanged (the server treats it as a one-element array) and are migrated to \`device\_features\` the next time the trigger is edited and saved. No database migration needed.
> 
> \## Forum
> 
> Forum: \`\`https://community.gladysassistant.com/t/scenes-ameliorer-la-selection-changement-detat-de-lappareil-avec-des-filtres-et-du-multi-select\`\`/8566
> 
> \### Checklist
> 
> \- \[x\] Tests pass: \`cd server && npm run coverage\` (3 new tests cover the \`device\_features\` matching and the per-feature timers; all 249 scene tests pass)
> \- \[x\] Linter and prettier pass on both front and server (\`npm run eslint\`, \`npm run prettier\`)
> \- \[x\] No undocumented breaking change (legacy \`device\_feature\` triggers still work as before)
> 
> 🤖 Generated with \[Claude Code\](https://claude.com/claude-code)
> 
> https://claude.ai/code/session\_01XRnjv9of8F9UmpFNkLmt6F
> 
> \---
> \_Generated by \[Claude Code\](https://claude.ai/code/session\_01XRnjv9of8F9UmpFNkLmt6F)\_
> 
> 
> \## Summary by CodeRabbit
> 
> \- \*\*New Features\*\*
> - Scene triggers now support selecting multiple features of the same type.
> - Feature search is case- and accent-insensitive and supports multiple search terms.
> - Multi-feature triggers independently evaluate matching devices and duration conditions.
> - Added localized guidance in English, French, and German.
> 
> \- \*\*Bug Fixes\*\*
> - Canceling a scene now reliably clears its pending timed triggers without affecting other scenes.
> - Existing single-feature triggers continue to work when edited or migrated.

This will be available in the next version of Gladys!

---

<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:** [August 14, 2026, 10:57am UTC](https://community.gladysassistant.com/t/scenes-ameliorer-la-selection-changement-detat-de-lappareil-avec-des-filtres-et-du-multi-select/8566/20 "2026-08-14T10:57:09Z")

</div>

Wow, that’s VERY, VERY practical! No more alarm mode with my 25 devices, each in a card!

[Next page](https://community.gladysassistant.com/t/scenes-ameliorer-la-selection-changement-detat-de-lappareil-avec-des-filtres-et-du-multi-select/8566.md?page=2)
