Should I keep automation ID's when splitting out?

I’m splitting automations into files bit by bit, i’m thinking I should I keep the ID’s so they can be brought back into the front end at a later date if this doesn’t go to plan.

Is there any downside to having these extra ID’s floating about?

No. They are used exclusively by the Automation Editor to assign each automation a unique identifier. The identifier doesn’t have to be numeric but it does have to be unique.

1 Like

Thanks!

I’d be right in adding:

automation split: !include_dir_merge_list ../automations

Then have each file ideally with just one list eg:

- id: '1588523251895'
  alias: Main Room Lights Toggle
  description: ''
  trigger:
  - device_id: f6e267e53f8b45c89901f7ea699982bb
    domain: deconz
    platform: device
    subtype: turn_on
    type: remote_button_short_press
  condition: []
  action:
  - device_id: bd9b5242a9e140c3b6f48485d4b655ef
    domain: light
    entity_id: light.main_room_lights
    type: toggle
  - device_id: cf8582a871ed44fdb4aedb6a264cd427
    domain: switch
    entity_id: switch.ikea_smart_plug_1
    type: toggle

But doing it this way would give me the flexibility to have more than one automation per file, if i’ve understood this right?

The other option being: !include_dir_list, which would limit me to one strict automation per file - this is what i’ve seen frenck do.

Any pros and cons to what I am doing? Seem to be two sides of a coin and just a general choice to make?

i’ ve just tested this, and it seems to do what i want:
Allow two automations in a file, but assume that i will only ever have one

All still seems to work for now :slight_smile:

What you have said seems correct but I don’t understand your reasoning, you are suggesting that (say) I have 192 individual files for my automations ?
A file system works with clusters, and if the clusters are 4kb then the file size (on disk) will be a multiple of 4kb. Whether the file is 10 bytes or 3999. (and 8kb if the file is say 6432 bytes (unlikely))
Doing what you suggest will lessen the opportunities for wear evening on an SD card shortening it’s life too.

Just as an alternate why don’t you look at packages.
Packages allow you to put all things in one place (how you organise it is then up to you) But that means all your fishtank automations, input boolean’s, input_number ‘s, scripts etc ALL go in (say) your’ fishtank.yaml file.
Same for occupancy, heating, bedroom, kitchen, living room etc. It means that if you have a problem with something in the kitchen then you only need look in your kitchen.yaml file

Sorry yes, I am essentially looking into packaging everything, i think i’ve not explained myself well enough. I should probably post the layout better, but my config.yaml just has packages loading from dir /integrations and each file there loads from thereon, etc…

But I have a few 5 button ikea remotes, and a I wanted some automations to have a few things happening in one file just because it makes sense in my head, since they can allow for many many things to happen.

I have Home Assistant running supervised in a docker on a laptop, so i have no worry for wear, or raw computing power.

Glad to hear it’s working.

Please mark my post (above) with the Solution tag to indicate that this topic’s question has been answered. It helps others, with a similar question, to find the answer.

1 Like