Platform automation does not generate unique IDs -- how to fix?

How do I resolve these issues with Automations?

I seem to get these Errors on many automations? I get these errors on both normal automations and ones blueprints create.

one of them in the below error is about as simple as it can get…

alias: "Close Master Bathroom Shades : Sundown"
description: ""
triggers:
  - trigger: sun
    event: sunset
    offset: "00:20:00"
conditions: []
actions:
  - action: cover.close_cover
    metadata: {}
    data: {}
    target:
      entity_id: cover.master_bathroom_shade_group
mode: single

Errors…

Logger: homeassistant.components.automation
Source: helpers/entity_platform.py:824
integration: Automation (documentation, issues)
First occurred: May 9, 2025 at 9:07:14 PM (726 occurrences)
Last logged: 1:32:44 PM

Platform automation does not generate unique IDs. ID 1740797444318 already exists - ignoring automation.door_open_patio_repeating
Platform automation does not generate unique IDs. ID 1742652338893 already exists - ignoring automation.notify_door_open_mudroom_repeating
Platform automation does not generate unique IDs. ID 1742652411221 already exists - ignoring automation.notify_door_open_large_deck_repeating
Platform automation does not generate unique IDs. ID 1744154956771 already exists - ignoring automation.master_bathroom_shade_group_sundown
Platform automation does not generate unique IDs. ID front_door_and_mudroom_lock_status_updater already exists - ignoring automation.notify_door_lock_zwavejs

Uninstall HA. Stop there.

2 Likes

Are you hard coding unique_id in automations? Are you using the UI to create these automations?

3 of those are from this Blueprint – YAML from one of them in the error msg, posted below

1 is the super basic YAML I posted above (made using the Visual Editor).

I dont create id: for my automations and I dont see one in the YAML for master_bathroom_shade_group_sundown (the one the Visual Editor created)

alias: "Notify : Door Open Patio"
description: ""
use_blueprint:
  path: LTek/repeating-alerts-ltek.yaml
  input:
    trigger_entity:
      - binary_sensor.alarm_zone_4
    duration_from_issue_state:
      hours: 0
      minutes: 0
      seconds: 5
      days: 0
    notification_title: >-
      {{ friendly_name }} is Open - {{
      as_timestamp(states[trigger.entity_id].last_updated) |      
      timestamp_custom("%I:%M:%S %p") }}
    repeat_notification: true
    max_repeat_count: 3
    notification_color: yellow
    notification_icon_warning: door-open
    notify_services_string: notify.notify
    notification_message: " "
    bypass_entities:
      - input_boolean.bypass_patio_motion

no, nothing is hard coded. I included the YAML above.

thx for the help

@petro this problem still exists… today I tried changing the IDs manually, same error just now it calls the new IDs. I used Notepad ++ to ensure these automations are not duplicated, and the IDs are not either.

I ALWAYS get an error saving automations for the first time… this has happened since Day 1 (many months ago). The automations throw the error only on the first creation save… never after that. I have well over one hundred I’ve created, and I only get the log error on these. Again, the IDs are 100% unique, even changing them make no diff; log error no matter what.

All my automations are created in the UI so I assume this a bug. Hoped it would be fixed by now.

Seems like the least the engine could do is tell you where (file and line number) it thinks the duplication occurs… then we could see why this bug occurs

Post all your automations. The error is very specific and is calling out specific IDs and automations that are causing the problem. They are not related to any of the automations you’ve posted so far.

here’s my automations.yaml… Download automations.yaml | LimeWire

the last log was yesterday showing the below, doing a test match search, none of them are in the YAML but they are in the system and they run so I’m not sure where the content for those automations are stored.

Platform automation does not generate unique IDs. ID 1742652338893 already exists - ignoring automation.notify_door_open_mudroom_repeating
Platform automation does not generate unique IDs. ID 1742652411221 already exists - ignoring automation.notify_door_open_large_deck_repeating
Platform automation does not generate unique IDs. ID 1744154956771 already exists - ignoring automation.master_bathroom_shade_group_sundown
Platform automation does not generate unique IDs. ID front_door_and_mudroom_lock_status_updater already exists - ignoring automation.notify_door_lock_zwavejs
Platform automation does not generate unique IDs. ID radarr_sonarr_notify already exists - ignoring automation.notify_on_radarr_sonarr_grab_or_download

You have multiple entries in that configuration that are duplicate ids.

front_door_and_mudroom_lock_status_updater:
  - Notify Door Lock Activity - ZwaveJS v2 TEST
  - Notify Door Lock Activity - ZwaveJS v2 TEST
  - Notify Door Lock Activity - ZwaveJS v2 TEST
  - Notify Door Lock Activity - ZwaveJS v2 TEST
1739477166755:
  - Notify Motion : Driveway
  - Notify Motion : Driveway
1740080290926:
  - House Modes - Disarm when returning home
  - House Modes - Disarm when returning home
  - House Modes - Disarm when returning home
  - House Modes - Disarm when returning home
1740797444318:
  - Notify : Door Open Patio
  - Notify : Door Open Patio
1742652338893:
  - Notify : Door Open - Mudroom
  - Notify : Door Open - Mudroom
1742652411221:
  - Notify : Door Open - Large Deck
  - Notify : Door Open - Large Deck
1744154956771:
  - Close Master Bathroom Shades : Sundown
  - Close Master Bathroom Shades : Sundown
radarr_sonarr_notify:
  - Notify on Radarr/Sonarr Grab or Download
  - Notify on Radarr/Sonarr Grab or Download
  - Notify on Radarr/Sonarr Grab or Download

The error you’re getting is telling you that.


It looks like you are using yaml anchors to ID these automations listed above, and you duplicate them many times.

line anchor automation
1182 &id007 front_door_and_mudroom_lock_status_updater
1847 &id001 1739477166755
1912 *id001 1739477166755
2200 &id002 1740080290926
2315 *id002 1740080290926
2316 *id002 1740080290926
2317 *id002 1740080290926
3377 &id003 1740797444318
3404 *id003 1740797444318
4075 &id004 1742652338893
4098 *id004 1742652338893
4099 &id005 1742652411221
4123 *id005 1742652411221
4353 &id006 1744154956771
4372 *id006 1744154956771
4927 *id007 front_door_and_mudroom_lock_status_updater
4928 *id007 front_door_and_mudroom_lock_status_updater
4929 *id007 front_door_and_mudroom_lock_status_updater
7106 &id008 radarr_sonarr_notify
7146 *id008 radarr_sonarr_notify
7147 *id008 radarr_sonarr_notify

@petro
thanks for looking into this; how do I fix this?

I’m sure you will not be surprised when I tell you I have no clue what any of that means/is, or how it happened. I create all my automations using HA’s Automation Editor UI, and a few (mostly the notifications) Blueprints from long-time blueprint creators.

Compare the changes here with your file you posted above. The dpaste changes should work as a copy/past however I have no idea if you’ve added more automations in the past 5 days. So you may just want to learn what was altered.

thank you, I think I see… looks like removal of all anchors and ensure the IDs has a dash preceding them.