Put Automations & Scripts in Folders/Groups

Tags: #<Tag:0x00007f7393f1ed58>

I have sets of automation’s that are all related to each other. It would be good if I could group them together in a folder or group somehow rather than having to search through the long list of automation’s.

In my example, I have some custom alarm handling. I have separate automation’s for;

  • Auto enable the alarm when we leave the house
  • Disable the alarm when we return
  • Fire the alarm when certain sensors are triggered
  • Send notifications when alarm triggers

It would be good to put these all in a folder called Alarm and kept separate from all of the other hundreds of automation’s I have.

I do like the idea of folders. THe idea of just adding columns to the table and sorting or filter by that can be useful but I would rather have the ability to add them to folders and organize them the way that makes sense to me. Seeing all these automation where the name is basically the same just different room or entity is hard to narrow it down to which one I am wanting to edit

I had another thought if you wanted to keep the table layout… You could add “tags” to the automation/script which could then be filtered on in the list. You could then put a horizontal list of tags underneath the search box that you could just click on to filter the list down by. This provides quite a bit more flexibility in that you could have automation’s with multiple tags and could be grouped multiple ways.

I could then tag all my alarm automation’s as “alarm” and then just click the alarm tag to filter the list.

4 Likes

Also missing this now I’m having a lot of automations.

It like to have something similar, but based on “labels” or tags". An automation could be assigned to multiple tags or labels (and so could about everything else in HA. Devices, area’s, entities, lights, dashboards, whatever).

15 Likes

+1 for Tags

2 Likes

Agree with the idea’s here and would love to see them, however some good naming conventions and the search have helped me out. “[ what ] - [ which ] - [ when ]” I’ve found works on giving names to automations & scripts.

So for @lukebrowning case I’d create them as “Alarm - Enabled - Leaving”, “Alarm - Sensor - Triggered” as examples. I can then search for "Alarm - " and get all associated items. Or as another example “Lights - Lounge - On At Dusk” and can then search on either "Lights - " or a specific “Lounge”.

But agree, folders or tags would be nice way to go

2 Likes

+1 for this.

In fact, I had opened a frontend ticket for this a little while ago.

1 Like

Yeah, I voted for this since I have the same issue, but I’m not sure folders are the right solution. Tags are probably much more effective and usable overall.

Tags would be very helpful, especially as user / access control features get added later.

I’d love to write a rule that says:

automatons tagged with user:admin can only be toggled on/off by users in the admins group

for example.

1 Like

I came to this forum to post that (and perhaps I still will).

Basically it would be groups, but UI-controlled, and at the entity level (not a global management page).

E.g. Tag all your “noisy” automations. Then make a house mode called “Quiet Mode” that turns off all your loud automations (servo blinds, music, etc).

The lack of a solid “House Mode” and “Feature” (collection of entities supporting a feature) story that is by far the biggest “wtf” to me about HA. And tags would drastically help flesh that story out.

I was just thinking of this the other day! I think a combination of tags and folders would work well. You could put automations or scripts in folders (which would display at the top of the list) and you could also tag them individually so you could easily search for automations under the same tag, but in separate folders. That way if you wanted to, for example, group automations that all related to specific rooms you could put them in room folders but also tag ones which related to lights to make all the light automations easy to find (by using a tag search function)!

+1 for making groups in Automations

2 Likes

Came here to add this. I have so many automations and the organisation is becoming a mess!

1 Like

Can we extend this idea to entities and devices also?

But this is possible now and i use it maybe year. Simply use something like me. Note special include in automations line!

counter: !include configurations/counters.yaml
sensor: !include configurations/sensors.yaml
binary_sensor: !include_dir_merge_list configurations/binary-sensors/
switch: !include configurations/switches.yaml
light: !include configurations/lights.yaml
group: !include configurations/groups.yaml
automation: !include_dir_merge_list automations/
script: !include configurations/scripts.yaml
shelly: !include configurations/shelly.yaml
variable: !include configurations/variables.yaml 
alert: !include configurations/alerts.yaml
climate: !include configurations/climate.yaml

@bigboban Yes, it is possible - but there are 2 downsides to this implementation/ 2 aspects not yet supported:

  1. These automations cannot be edited in UI
  2. The automations are not sorted/ arranged in the UI, so the clutter persists in the UI even when the file organization is clean
2 Likes

Yes, I miss that too!. Sometimes you just want to make an adjustment on the code and it’s uncomfortable to go through an editor.
Also you may want to do a little automation but if you have automations anywhere else than the default automations.yaml, the automation created won’t be applied.
I have an automations folder which is included in configuration.yaml instead of the default automation file. When I want to make an automation from the editor it creates an automation.yaml in the home directory and puts the automation there. But as the file is not included in the configuration it won’t work!

+1!

Tags or labels would be awesome and much better than folders.

1 Like

Oh pretty please – tools to tidy automations / scripts in gui would be manna from heaven. Even just folders – if made, I’m happy to buy the coder coffee for a year :slight_smile: