Filter scenes that use a specific device (MQTT device, Zigbee device, ...)

Hello,
I now have a few hundred scenes, and I no longer remember the details of each one. So it sometimes becomes complicated to find the scene that causes a particular behavior…

Specifically today, I would like to easily find the scene or scenes that reset an MQTT device I created to track the operating time of my heat pump… And I have a few dozen scenes that act on this device.
Nothing impossible in itself, I just have to open and reread each of the scenes I tagged « heat pump ».

But is there a faster way? A ‹ grep › in the Gladys files with the MQTT device name, perhaps?

And would that be a good feature idea to add to Gladys so that it can be done without ‹ tinkering › in the files?

EDIT on 29/1/25:
the exchanges below show a way to ‹ tinker › via the Gladys API, but there was also a suggestion of a filter in the scenes. In my opinion, to be usable by anyone, that’s the solution to prioritize.

This might also be useful for finding dashboards…

And I could see a ‹ search… › button in the configuration of a feature of an MQTT device, like this:

2 messages were split into a new topic: Scenes: Search scenes via API

Hi @StephaneB,

I’m open to a concrete proposal :slight_smile:

It would be best to have a mockup on https://whimsical.com/ for example

I didn’t use Whimsical, but I made this. Is this what you expect to clarify the idea?

![image|690x320](upload://jG3y

I’m afraid it’ll become a mess if we start adding filters based on the content of the scenes on this view…

Then we’ll get requests for filters for anything and everything, it’s endless :sweat_smile: on mobile the view will be too cluttered, right?

Aren’t there any other options to achieve the same result?

I see two alternatives:

  • Place this in the device configuration screens, in the integration pages. But it would need to be done in several places: MQTT, Zigbee2MQTT, Hue, Netatmo, … Basically on almost all integration pages. It’s the mockup I proposed in November (just above in this thread)
  • Create a ‹ Search › menu in the ‹ Settings › page that allows searching for all usages of any device

And in both alternatives, Gladys could search for all usages in scenes, but also in dashboards.

Just a second filter; I don’t think that would make things messy.

And on mobile, it would seem OK to me to have two management lines rather than a single one: device filter and tag filter on the first line, sort order and text search (with more space than today) on the second line.

I’m making a quick mockup to illustrate…

On mobile:

It’s always « Just one more » :smiley: and then it’s a toolbar like a 2000s browser ^^

I’m really not convinced!

Originally, the purpose of tags was already that: to allow classifying your scenes.

I have lots of scenes too, and I’ve already sorted them by room, then if needed to be more specific, by function (ex: « Alarm », « Presence », « Voice »)

that could be an option!

Hello @StephaneB

I also confirm that I would like this feature, which would allow searching/sorting the devices used in scenes (the number of which is increasing for me…).