Unique automation id and script naming problems

I have two errors that I think is related.

I get this after reboot, I read that it might apear if you add code in gui/edit in yaml or using vs code, I tried to fix this automation yesterday using both metodes soo its probably my fault isch?

   > Source: helpers/entity_platform.py:873
   > integration: Automation (documentation, issues)
   > First occurred: 12:18:00 (2 occurrences)
   > Last logged: 13:02:16
   >
   > Platform automation does not generate unique IDs. ID bevattning_schema_intervall already exists - ignoring automation.bevattning_schema_interva ll

The automation

id: bevattning_schema_intervall
alias: Bevattning — Schema (intervall)
description: ''
triggers:
  - at: '10:00:00'
    trigger: time
conditions:
  - condition: state
    entity_id: input_boolean.bevattning_aktiverad
    state: 'on'
  - condition: template
    value_template: >-
      {% set last = state_attr('automation.bevattning_schema_intervall',
      'last_triggered') %} {% set dagar =
      states('input_number.bevattning_intervall_dagar') | int(1) %} {{ last is
      none or (now() - last).total_seconds() > (dagar * 86400) - 3600 }}
actions:
  - action: script.bevattning_kor_pump
    data:
      seconds: '{{ states(''input_number.bevattning_tid_sekunder'') | int(10) }}'

The automation is there but this might be the reason I get the second problem, im trying to run a script script.bevattning_kor_pump but get an error: script cant be found, the script is there, I have only that one and the entity is correct,.

The error in traces

Stopped because an error was encountered at 5 May 2026 at 13:35:28 (runtime: 0.00 seconds)

Action script.bevattning_kor_pump not found

The script

alias: Bevattning — Kör pump
description: Hur länge pumpen ska gå.
fields:
  sekunder:
    description: Hur länge pumpen ska gå (sekunder)
    example: 10
variables:
  sek: >-
    {{ (sekunder | default(states('input_number.bevattning_tid_sekunder')) |
    int(10)) }}
  sakra_sekunder: "{{ [sek, 60] | min }}"
sequence:
  - condition: state
    entity_id: input_boolean.bevattning_aktiverad
    state: "on"
  - action: switch.turn_on
    target:
      entity_id: switch.tr01_bevattningshub
  - delay:
      seconds: "{{ sakra_sekunder | int }}"
  - action: switch.turn_off
    target:
      entity_id: switch.tr01_bevattningshub
mode: single

If I check developer tools action its not there, only a script called script.bevattning_kor_pump_sakert_v2

If I check developer tools States and check the state of my script its called script.bevattning_kor_pump

Not with the pump_sakert_v2 at the end?

I have all the latest installed pure haos on i386 pc.

Thers only one of this automation in automation.yaml

What is going on?

Edit: If I go into the device under mqtt and open the device TR01 Bevattningshub (its a Thidreality waterpump) and there I can see all the info, and a script, I open that script and check its entity and its bevattning_kor_pump_2?? HA somehow added _2 to it, I guess has some old refernce to something that I deleted soo it cant have the same name twice even if its not in use anymore, WHERE the hell is that unused name beeing picked from???

I rebooted again after some tinkering, and new error, and none of the references make sence, how can i open?

.storage/lovelace.lovelace': [1515]
This error originated from a custom integration.

Logger: custom_components.watchman
Source: custom_components/watchman/coordinator.py:139
integration: Watchman (documentation, issues)
First occurred: 5 May 2026 at 23:24:37 (1 occurrence)
Last logged: 5 May 2026 at 23:24:37

? Unable to locate automation: bevattning_kor_pump_sakert_v2 for switch.tr0***********~. Occurrences: {'.storage/lovelace.lovelace': [1515], 'automations.yaml': [562, 569], 'scripts.yaml': [18, 23]}

I figured out the hidden files settings, I instlled Blueprint Studio and it looks better a simple show hidden files in settings, I found the .storage/lovelace.lovlace 1515 and noo no relevant info, I found another wrong reference in another automation but I haddent run that yet, but fixed it, reloaded all and now it works??? I didnt change and name from _2 to not having that end suffix, strange but it works and spending 4 hours atleast on this is somewhat sad.. end of story.