Automation folders

@jph59 @elyobelyob

Using a naming convention when naming your automations to help you keep them sorted. I name all of my automations starting with the “category” they are in so they are all grouped together in the list.

- id: ceiling_fan_office_fan_in_use
  alias: "[Ceiling Fan] Office Fan In Use"
  description: "Turn in use timer on when device state changes."

- id: ceiling_fan_office_fan_auto_on
  alias: "[Ceiling Fan] Office Fan Auto On"
  description: "Turn ceiling fan on."

image

3 Likes

A naming convention only helps if:

  • you follow it 100%
  • you keep it up to date
  • you don’t have too many

it’s a reasonable workaround but it has limited mileage as well

I did take a look at adding this, it required a significant FE rejiggle that I didn’t have time for when I was looking at it

Yeah, good tip. I already do prefix my names and my Xmas lights are all at the end of the list anyway. Probably will prepend others with zzz_ or something to move them out of the way when needed to be “archived”.

But this is pretty much what folders would achieve, and would also mean not having to ‘complexify’ names.

Also, if I ever want to use my automations via voice, this would not be useful.

Just a thought on your Christmas automations. You could just put a condition in to have them run them only the dates you want them to. That way you’ll never have to turn them on or off. Set it and forget it.

condition:
  condition: time
  after: input_datetime.christmas_start
  before: input_datetime.christmas_end

Thanks, but the issue isn’t about them running. The decorations are now safely in a box. Doesn’t really matter if I don’t bother switching them off. It’s just organising my entire list, with just about 40 automations - a low amount really - it’s niggling me that I’d like to tidy it. Anyway, it’s not the most important thing in the world!

I came here to purpose the same thing. If you mean like be able to categorize your automations. Maybe be able to use a tagging system? Set a tag like [Lights] and in the automation view you could have them grouped up with and be able to fold out the categories if that makes sense?

Like this for Configuration>Automations

Automations
  LIGHT
    yourlightautomation1
    yourlightautomation2
  NOTIFY
    yournotifyautomation1
    yournotifyautomation3

And this also could apply to scripts etc

1 Like

+1 … automations list is out of hand in a flat list.

+1, automating the IKEA Symfonisk dials and its getting messy (in UI)

Yeah, would like to see that as well - as my automations are getting more and more. :slight_smile:

+1
Why were folders/directories created in the beginning? Once you have a lot of automatons the housekeeping is awful with everything in one file. In the beginning I created everything manually. I thought I would try using the UI. I’ve discovered the UI stores the created automatons in the automatons directory but they do not run nor appear in the list.

Can you imagine if all our OS files were in the root directory?

I create them using the UI then move them to my normal hierarchy folders. However, there is never any editing them.

A Triplicate
I would like it, If an object or entity (script/Automation) had A label/tag option, that excepts “/“ that represent sub tags or Folders in the GUI & “,” as separate Tags. E.g.

  1. Tag: “Lights” shows in the GUI in the Folder “Lights”.
  2. Tag: “Light/Effects” would show in the GUI in the Folder “Effects”, nestled under the Folder “Light”.
  3. Tag: “Lights, Effects” would show in the GUI in both folders “Effects”, & the Folder “Lights”.
  4. Tag: “Light/Effects, Light” would show in the GUI in both folders “Light”, & the Folder “Effects”, nestled under the Folder “Light”.
  5. Tag: ““is empty”” or “root” would show up under the root folder in the GUI.
alias: A Light Script
tags: light, light/effects
sequence:
  - service: light.turn_on
    data: {}
    target:
      area_id: office
mode: single

And the “Tag” option can be reference via HAss Jinja2 extension’s

state_attr ( script.a_light_script, 'tags')

When moving entities in the GUI to a different folder, the GUI gives the options “Change” &or “Both”.
Reference# Labels, Tags & Folders for Automation Scripts

Not only for automations but for things that can get too messy as well, such as scripts and helpers.

i’ll bump this up again, was looking for a solution for this.

Trigger IDs can massively reduce the clutter here, because you can keep related triggers and actions in one ha automation.

they are currently a bit of a hidden gem and a lot of people seem to be unaware, hence this related feature request for the automations UI: Use trigger IDs by default in automations - Feature Requests - Home Assistant Community (home-assistant.io)

1 Like

Tags can already be included in the automation name. For example, if there’s a breaking change in the way my instance sends SMS messages, I can list the automations that need updating:

Works for scripts and helpers too. More flexible than folders would be.

Any system is going to require a little effort! :grinning_face_with_smiling_eyes:

Bumping this, give us folder structures please. I now have about 50 which is not a huge number and it is already getting out of hand. I would like to be able to choose folders and subfolders to store them in.

Folders require little effort but go much further in helping to visually organize than just adding several bracketed pieces to the names in the same (less effective) effort to organize.

I do use tags, but it seems less convenient to me than using folders. I do much of my work in YAML directly (such as, for my dashboard), but I do receive immense value from being able to tinker with my automations from the UI).

If there’s buy-in from the HA team, I would be willing to study the code a bit and put up a PR, as I’ve been thinking about contributing back to this project, and this seems like a good first step :smiley:

Not sure how this duplicate slipped through and persisted for so long, vote here