# Possibility to categorize / group scenes

**URL:** <https://community.gladysassistant.com/t/possibilite-de-categoriser-grouper-les-scenes/7081>\
**Category:** Demandes livrées\
**Tags:** scene, feature-core, regroupement\
**Created:** [March 20, 2022, 11:48am UTC](https://community.gladysassistant.com/t/possibilite-de-categoriser-grouper-les-scenes/7081 "2022-03-20T11:48:12Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Checconio](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/checconio/32/19810_2.png) [@Checconio](https://community.gladysassistant.com/u/Checconio)\
**Post date:** [March 20, 2022, 11:48am UTC](https://community.gladysassistant.com/t/possibilite-de-categoriser-grouper-les-scenes/7081/1 "2022-03-20T11:48:12Z")

</div>

**Feature description**

Hello 🙂  
When you start to have a fairly extensive installation with Gladys, you also start to have a lot of scenes!

I think it would be more readable and easier to use if we could put our scenes into categories (visible as a banner, for example) that can be hidden and displayed.

Or in the manner of Dashboards with a dropdown list?

Thank you 🙂

---

<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:** [March 21, 2022, 7:56am UTC](https://community.gladysassistant.com/t/possibilite-de-categoriser-grouper-les-scenes/7081/2 "2022-03-21T07:56:04Z")

</div>

What I think is complicated is knowing whether we want predefined categories… or the ability to create our own categories. Since each user will want to create a scene that is unique to them, the same will go for the categories.

I also think we need to find a way to organize the scenes to manage them better.

I had considered the possibility of displaying them as a list whose order can be changed by drag & drop.  
This would allow more to be displayed on a single page, with better readability.

Especially since by naming them appropriately, you can find your way around quite easily:

```auto
[LIGHTS] Dim the brightness in the evening
[ALERT] Mailbox mail
[ALERT] Temperature < 15°
[INFO] The dog's bowl is empty

```

Etc…

---

<div class="post-metadata">

**Author:** ![Checconio](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/checconio/32/19810_2.png) [@Checconio](https://community.gladysassistant.com/u/Checconio)\
**Post date:** [March 21, 2022, 12:10pm UTC](https://community.gladysassistant.com/t/possibilite-de-categoriser-grouper-les-scenes/7081/3 "2022-03-21T12:10:08Z")

</div>

Yes, for me I was already thinking about categories created by users as we do for the Dashboards.

I think the goal would be to be able to have a possible separation between the scenes of your choice.

For example, in my case, I could separate the scenes of my aquarium, the living room lighting, and the scenes of the alarm system.

---

<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 21, 2022, 12:51pm UTC](https://community.gladysassistant.com/t/possibilite-de-categoriser-grouper-les-scenes/7081/4 "2022-03-21T12:51:14Z")

</div>

Why not, I can see a filterable tag system for example! Something to think about 🙂 😊

@Checconio Since you say your installation is becoming quite extensive, would you be interested in being interviewed for my YouTube series «&nbsp;Gladys Assistant chez vous&nbsp;»?  
([https://www.youtube.com/playlist?list=PLkBwN\_hZI5TeMkv-sZ0UdU4AVxIOHefIG](https://www.youtube.com/playlist?list=PLkBwN_hZI5TeMkv-sZ0UdU4AVxIOHefIG))

(We can discuss this privately if you like, to avoid cluttering the topic here)

---

<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:** [March 21, 2022, 5:08pm UTC](https://community.gladysassistant.com/t/possibilite-de-categoriser-grouper-les-scenes/7081/5 "2022-03-21T17:08:52Z")

</div>

> [@pierre-gilles](#):
>
> Why not, I can see a filterable tag system for example! Something to think about 🙂

That’s a great idea 👍 especially since it’s usually very simple for the user to use, and it’s very flexible: a scene can have multiple tags.

---

<div class="post-metadata">

**Author:** ![Checconio](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/checconio/32/19810_2.png) [@Checconio](https://community.gladysassistant.com/u/Checconio)\
**Post date:** [March 21, 2022, 5:14pm UTC](https://community.gladysassistant.com/t/possibilite-de-categoriser-grouper-les-scenes/7081/6 "2022-03-21T17:14:22Z")

</div>

Yes a tag will allow displaying the same scene in multiple «&nbsp;views&nbsp;» which is indeed better than what I had in mind 🙂

---

<div class="post-metadata">

**Author:** ![spenceur](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/spenceur/32/1961_2.png) [@spenceur](https://community.gladysassistant.com/u/spenceur)\
**Post date:** [August 13, 2022, 8:52pm UTC](https://community.gladysassistant.com/t/possibilite-de-categoriser-grouper-les-scenes/7081/7 "2022-08-13T20:52:37Z")

</div>

Small bump because this point is starting to interest me 😃  
I’ve got a parent scene that is triggered by a motion sensor.  
This scene only triggers scenes in // which themselves trigger others ^^  
So I end up with a lot of scenes and it’s quickly confusing 😃  
![Screenshot\_20220813-225015\_Chrome|180x500, 100%

---

<div class="post-metadata">

**Author:** ![Checconio](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/checconio/32/19810_2.png) [@Checconio](https://community.gladysassistant.com/u/Checconio)\
**Post date:** [August 13, 2022, 9:09pm UTC](https://community.gladysassistant.com/t/possibilite-de-categoriser-grouper-les-scenes/7081/8 "2022-08-13T21:09:30Z")

</div>

I’m learning the same tech as Gladys for a personal project.  
Once I’ve mastered it, I might look into developing the feature to test it ^^

---

<div class="post-metadata">

**Author:** ![Terdious](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/terdious/32/6316_2.png) [@Terdious](https://community.gladysassistant.com/u/Terdious)\
**Post date:** [January 30, 2023, 8:23am UTC](https://community.gladysassistant.com/t/possibilite-de-categoriser-grouper-les-scenes/7081/9 "2023-01-30T08:23:16Z")

</div>

Quick bump to keep this in mind for development.

- Interesting topic about the ‹&nbsp;Tag&nbsp;› in the feature request [Classer les intégrations avec des tags et filtres (Gladys Plus, Cloud, utilisées, ...)](https://community.gladysassistant.com/t/separer-les-integrations-utilisables-uniquement-avec-gladys-plus/7890)
- Interesting topic about the display / front-end [Pouvoir trier la liste des Dashboards - #20 par pierre-gilles](https://community.gladysassistant.com/t/pouvoir-trier-la-liste-des-dashboards/7532/20?u=terdious)

Also, the feature request already existed since October 2021:

> [@Dossiers pour les scènes](https://community.gladysassistant.com/t/dossiers-pour-les-scenes/6634):
>
> Les nombre de scènes deviens vite grand, il pourrait être utile de pouvoir les organiser en les groupant dans des «&nbsp;dossiers&nbsp;»

@Pasdesushi, @PhilippeMA, @Psoy (I see that you voted for both), @syper and @Kalvin maybe could you group your votes on this one and we’ll close the other (the discussion will remain accessible)?

---

<div class="post-metadata">

**Author:** ![Lokkye](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/lokkye/32/5881_2.png) [@Lokkye](https://community.gladysassistant.com/u/Lokkye)\
**Post date:** [June 28, 2023, 6:57am UTC](https://community.gladysassistant.com/t/possibilite-de-categoriser-grouper-les-scenes/7081/10 "2023-06-28T06:57:54Z")

</div>

Hello,  
I did a small test by setting up a tagging system in the scenes.

 ![Screenshot 2023-06-28 at 08.52.58](https://gladys-assistant-community.b-cdn.net/uploads/default/original/2X/3/36677b25a44ae54e834dec08d1e4b3a8d9d0a4ec.png)  
 ![Screenshot 2023-06-28 at 08.52.47](https://gladys-assistant-community.b-cdn.net/uploads/default/original/2X/e/e4a03fa01c3cfba36916c6c4b76c1a848d5ef844.png)  
 ![Screenshot 2023-06-28 at 08.45.50](https://gladys-assistant-community.b-cdn.net/uploads/default/original/2X/8/82ef5068ab623c8b856389fe13c6067340e87625.png)  
 ![Screenshot 2023-06-28 at 08.45.40](https://gladys-assistant-community.b-cdn.net/uploads/default/original/2X/b/b579c7eb6d12efb8eccdeefd160db87681d09d6e.png)  
 ![Screenshot 2023-06-28 at 08.45.16](https://gladys-assistant-community.b-cdn.net/uploads/default/original/2X/a/a4fbb625cea7115327ec7f5897b86c4030a6ee0e.png)

I’ve modified the search to filter by tags and titles.

Does this meet your needs?

---

<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:** [June 28, 2023, 10:00am UTC](https://community.gladysassistant.com/t/possibilite-de-categoriser-grouper-les-scenes/7081/11 "2023-06-28T10:00:55Z")

</div>

I think it’s great; for me it meets the request.

Small aesthetic question: I think the tags should be aligned differently, not centered / or not in that spot on the boxes.

---

<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:** [June 28, 2023, 4:25pm UTC](https://community.gladysassistant.com/t/possibilite-de-categoriser-grouper-les-scenes/7081/12 "2023-06-28T16:25:02Z")

</div>

Great work on the development, functionally it’s nice but I think there’s a bit of design work to do 😃

**Editing**

In terms of editing, it’s weird to have tags inside a looong textarea that takes 100% of the width of the screen

Maybe the tags could be displayed «&nbsp;normally&nbsp;» on a grey background, and there could be a small «&nbsp;+&nbsp;» button to add tags (and an «&nbsp;x&nbsp;» on each tag to remove it)

Something along these lines:

 ![Screenshot 2023-06-28 at 18.20.41](https://gladys-assistant-community.b-cdn.net/uploads/default/original/2X/3/31e94de5fb9bc52878c32a3d47bb45660ee02573.png)

I think it’s important to see existing tags in order to be able to attach a scene to an already existing tag.

**Filtering**

We should think about a tag-based filtering system, something like this:

 ![Screenshot 2023-06-28 at 18.18.54](https://gladys-assistant-community.b-cdn.net/uploads/default/original/2X/2/210b8b433ae6a6d87d143a593ba12857d27e7298.jpeg)

Regarding the cards, I think there’s some reorganization to do to make it more visual 🙂

An example found on Dribbble:

 ![Screenshot 2023-06-28 at 18.22.17](https://gladys-assistant-community.b-cdn.net/uploads/default/original/2X/0/0ac96df312e6403bf25b7ecf3d88f1a596f92887.jpeg)

(I don’t want to do that at all, it’s just to show an example 😛 )

---

<div class="post-metadata">

**Author:** ![Lokkye](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/lokkye/32/5881_2.png) [@Lokkye](https://community.gladysassistant.com/u/Lokkye)\
**Post date:** [June 29, 2023, 7:14am UTC](https://community.gladysassistant.com/t/possibilite-de-categoriser-grouper-les-scenes/7081/13 "2023-06-29T07:14:48Z")

</div>

> [@pierre-gilles](#):
>
> In terms of editing, it’s weird to have tags in a looong textarea that takes up 100% of the screen width

You’re right, I just used a lib «&nbsp;react-tag-input-component&nbsp;»

> [@pierre-gilles](#):
>
> Maybe the tags could be displayed «&nbsp;normally&nbsp;» on a gray background, and there’s a small «&nbsp;+&nbsp;» button to add tags (and a cross on each tag to remove it)

Ok I don’t see anything similar as a lib on the internet. I’ll probably create my own component. Should I try to make it as generic as possible so we can use it elsewhere?

> [@pierre-gilles](#):
>
> I think it’s important to see existing tags to be able to attach a scene to an already existing tag.

Yes, now that you say it it’s obvious.  
I think I’ll have to make changes in the models for that because for the moment I had gone with an array of strings in the devices. But to have access to all the tags of all the scenes I think I’ll have to create a «&nbsp;tags&nbsp;» table and a «&nbsp;device\_tag&nbsp;» table. And therefore add new CRUD routes to manage the tags, what do you think?

> [@pierre-gilles](#):
>
> We need to think about a tag filtering system, something like this:

Again, I think adding a «&nbsp;tags&nbsp;» table is important because that will avoid having to go through all the scenes to get all the tags.

> [@pierre-gilles](#):
>
> At the card level, there’s a bit of reorganization to do I think to make it more visual 🙂

Wouldn’t it be better to abandon the table view of scenes for just a list? Because we’re adding more and more things to the scenes display and we have less and less space.

---

<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:** [June 29, 2023, 7:37am UTC](https://community.gladysassistant.com/t/possibilite-de-categoriser-grouper-les-scenes/7081/14 "2023-06-29T07:37:09Z")

</div>

> [@Lokkye](#):
>
> Ok I don’t see anything similar in libraries on the internet. I’ll probably create my own component. Should I try to make it as generic as possible so it can be used elsewhere?

That’s better, yes 🙂

> [@Lokkye](#):
>
> But to have access to all the tags of all the scenes I think I’ll have to create a «&nbsp;tags&nbsp;» table and a «&nbsp;device\_tag&nbsp;» table. And therefore add new CRUD routes to manage tags, what do you think?

I imagine you mean «&nbsp;scenes&nbsp;» and not device

Indeed I prefer a relational approach, we’re rather relational on the project 🙂

**I see 2 options:**

1. Either as you described, a «&nbsp;t\_tag&nbsp;» table, and «&nbsp;t\_tag\_scene&nbsp;»
2. Or a single «&nbsp;t\_tag\_scene&nbsp;» table, making the relation between a scene and a tag (as text)

```auto
t_tag_scene:
- scene_id uuid
- name text

```

To find all available tags, simply do:

```auto
SELECT DISTINCT name FROM t_tag_scene

```

The option with the relation table is good if we ever wanted to really add additional options to the tags, but in our case here it might be overkill

I’d lean more towards option 2 personally, what do you think?

> [@Lokkye](#):
>
> Wouldn’t we need to abandon the table display of scenes for just a list? Because we’re adding more and more things in the scenes display and we have less and less space.

I don’t think so, we just need to rethink the display inside the card 🙂

---

<div class="post-metadata">

**Author:** ![Lokkye](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/lokkye/32/5881_2.png) [@Lokkye](https://community.gladysassistant.com/u/Lokkye)\
**Post date:** [June 29, 2023, 2:05pm UTC](https://community.gladysassistant.com/t/possibilite-de-categoriser-grouper-les-scenes/7081/15 "2023-06-29T14:05:04Z")

</div>

@pierre-gilles :  
I’m making a small suggestion using the «&nbsp;react-select&nbsp;» lib that we already use in gladys.

 ![Screenshot 2023-06-29 at 16.00.54](https://gladys-assistant-community.b-cdn.net/uploads/default/original/2X/b/b60f571f1e4d121b786205338528611db9487a98.png)  
But I’m not yet a fan of the result. What do you think?

Your solution is not bad, but it looks «&nbsp;odd&nbsp;» within the rest of the editing interface.

---

<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:** [June 29, 2023, 2:22pm UTC](https://community.gladysassistant.com/t/possibilite-de-categoriser-grouper-les-scenes/7081/16 "2023-06-29T14:22:55Z")

</div>

Just my two cents, personally I like it this way 🙂 it’s not intrusive, it’s easy to use, it gets the job done, I think

---

<div class="post-metadata">

**Author:** ![Terdious](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/terdious/32/6316_2.png) [@Terdious](https://community.gladysassistant.com/u/Terdious)\
**Post date:** [June 29, 2023, 2:47pm UTC](https://community.gladysassistant.com/t/possibilite-de-categoriser-grouper-les-scenes/7081/17 "2023-06-29T14:47:49Z")

</div>

The relational table is surely a good idea; reading that I thought it could be useful to be able to work on the devices!! I’m thinking specifically of MQTT devices that are also used virtually. Being able to link virtual devices to physical devices via tags, for example group the virtual ones, etc!!

---

<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:** [June 29, 2023, 4:12pm UTC](https://community.gladysassistant.com/t/possibilite-de-categoriser-grouper-les-scenes/7081/18 "2023-06-29T16:12:17Z")

</div>

> [@Lokkye](#):
>
> But well, I’m still not a fan of the result. What do you think?

Not a fan either, functional but it looks a bit like a «&nbsp;big block&nbsp;» in the middle of the screen, it doesn’t really fit into the existing design

If you don’t have many ideas, what I usually do is see how other products handle it: open a few products you use that have this kind of tagging system, and see how they do it. There’s no point reinventing the wheel when designers from big companies have already worked on this for hours 😉

For example, GitHub has split their «&nbsp;issue&nbsp;» page into 2 parts:

 ![Screenshot 2023-06-29 at 18.04.21](https://gladys-assistant-community.b-cdn.net/uploads/default/original/2X/c/cd58974bb4e7439974cb3c3b4c4a7b49aa17e883.png)

With the editing on the right (tags, etc..)

If you look at Zapier (which does the same thing as us: scenes), they have the same behavior as GitHub, a bar on the right:

 ![Screenshot 2023-06-29 at 18.06.00](https://gladys-assistant-community.b-cdn.net/uploads/default/original/2X/e/e7ed9f9917a2dde521f6105965ee9b9e04e6da9c.png)

If you click on «&nbsp;Settings&nbsp;», it looks like this:

 ![Screenshot 2023-06-29 at 18.07.28](https://gladys-assistant-community.b-cdn.net/uploads/default/original/2X/9/95e155621d239121ab91134098d8d4295676291c.jpeg)

I’m not saying it’s the solution, but in my opinion it’s worth exploring! It would allow you to put your component «&nbsp;react-select&nbsp;» in a sidebar that would be «&nbsp;delimited&nbsp;» and wouldn’t take 100% of the width.

I have quite a few projects in mind for the scenes: viewing the execution history of the scenes, with what happened in each run, and that could fit in this sidebar 🙂

What do you think?

> [@Terdious](#):
>
> I thought it could be a good idea to be able to work on the devices!!

One thing at a time, let’s stay focused here.

---

<div class="post-metadata">

**Author:** ![b3n.0](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/b3n.0/32/3458_2.png) [@b3n.0](https://community.gladysassistant.com/u/b3n.0)\
**Post date:** [July 17, 2023, 8:32am UTC](https://community.gladysassistant.com/t/possibilite-de-categoriser-grouper-les-scenes/7081/19 "2023-07-17T08:32:31Z")

</div>

> [@pierre-gilles](#):
>
> Everything in its time, let’s stay focused here.

Very promising!

---

<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:** [September 18, 2023, 11:46am UTC](https://community.gladysassistant.com/t/possibilite-de-categoriser-grouper-les-scenes/7081/20 "2023-09-18T11:46:31Z")

</div>

This morning I was thinking that we could add filters to the scenes view.  
For example: active / disabled / by type of triggers (selection of devices) / etc.

[Next page](https://community.gladysassistant.com/t/possibilite-de-categoriser-grouper-les-scenes/7081.md?page=2)
