This automation cannot be edited from the UI

I’ve started receiving the following error:

This automation cannot be edited from the UI, because it is not stored in the automations.yaml file, or doesn’t have an ID.

A search leads to this comment but I have automations.yaml within my configuration (and are only using automations.yaml, not splitting it up) and all of my automations have unique ids generated originally by HA (except for the below one that apparently needed to have a unique ID generated).

I just use the standard structure for my configuration:

# Section of my configuration
group: !include groups.yaml
automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml
# An example automation of mine in automations.yaml
- description: Alerts from weather.gov
  id: '2a9cc742-b6a2-41ac-b10b-30ed93430b15'
  mode: single
  trigger:
    - platform: numeric_state
      entity_id: sensor.southeastern_burlington
      attribute: alerts
      above: 0
  condition: []
  action:
    - service: notify.weatherbot
      data_template:
        target: !secret discord_target
        message: >
          ```Special weather alert: 
          
          {{state_attr('sensor.sensor.southeastern_burlington', 'description')}}```
  alias: Weather Alerts

Attempting to migrate the automation via the UI prompt results in a Response error: 500 error.

Any ideas?

Thanks,
Chris

1 Like
  • is the automations.yaml file write protected?
  • does every automation in your automation.yaml have an id attribute?
1 Like

No not protected, and everything has an id

It looks like it might be related to secrets :sweat:

anyone have a solution for this ?

Same thing happening to me today. Was updating an automation and all of a sudden I can’t edit any of my automations via UI.

1 Like

I have the same issue now as well

I also encountered the problem some time ago.

I tried to migrate it and deleted it from the yaml afterwards (I duplicated it to get a “clean” version before that).
After I deleted it in the automations.yaml, it was still active somewhere behind the scenes (and not visible in the UI nor the yaml).
I was also able to find it in Developer tools in States as an automation entity and set it to OFF.
However, after a while it came back to ON, so I switched it back to OFF.

It’s annoying and I don’t know how to get rid of it.

Any help would be greatly appreciated.

Having this same issue on one of my systems. But it’s only when I’m connected remotely. On the LAN everything works fine.

1 Like

Check the actual automations.yaml file from e.g. notepad or another text editor. I have experience duplicates of an automation, resulting in strange behavior. Check if the automation is actually 2 times in automation.yaml.

So far the only thing I have noticed is that in chrome both on my windows desktop and macbook I’m getting this error. However the same automation loads fine for me on safari and edge.

1 Like

Thanks for this tip! I just started getting this error yesterday after I upgraded HA. I’m running HAOS on an rpi 4.

My versions
Home Assistant 2023.8.2
Supervisor 2023.08.1
Operating System 10.4
Frontend 20230802.0 - latest

I’d file a bug report, but I have to go to work to work on software bugs there, lol.

Update: it seems to be working in Google Chrome now. I’m not sure what fixed it ,but around the same time HA stopped working in Chrome, my self-hosted web sites started getting flagged as “dangerous” and “deceptive” in Google Chrome.

Note to self - find alternative to Google Chrome.

Just happened to me. Automation suddenly started saying they needed migration.

The moment I tried to migrate one the letsencrypt TLS certificate stopped working, an alternative browser than Chrome was required to accept the new self signed certificate to access the web ui.

I’ve had this happen randomly a couple of times - usually after I’ve suspended my virtual machine by savings its state, and then restoring the running machine. (More often that not because the host machine needed to be restarted after an update to something or other).

Every time the issue has occurred, fully shutting down the HA instance and rebooting from scratch fixed it - with no changes to automations.yaml

I have the same problem from about 20 days. Before, all was ok.
I have tried re-generate all ids with vscode (ex: - id: b73a2081-d933-4f6b-84a1-4af0849cd13e) and I’ve checked that all automations had an id.
Nothing

1 Like

Yes, I confirm that. Also for me, I resolve that to remove all !secret text

yes, removing !secrets from automations.yaml fixed it for me too.

I also experienced this problem today. Like @pcal said it may have something to do with hibernating the PC, waking up in another network, …

I run the HA interface in an MS Edge application on Windows 10. After hard-refreshing the app (ctrl-R) the error disappeared and I could edit the automations again.

Hope this is useful information for others who experience this problem…

I also encountered this issue today. Also happened after restoring from saved state of my virtual machine. Funny thing is I can login with remote access, but can’t login locally. Unfortunately complete shutdown HA didn’t solve the problem. As David pointed out, it’s caused by ip_bans.yaml. I found my local IP is listed in ip_bans.yaml for unknown reason. After removing the local IP in ip_bans.yaml and restart HA, it’s back to normal.

So I had the same issue, and after pulling my hair for many days, I have found what was causing it:

In some automations, I was calling a service to send a Slack notification. The script sends a message to a slack channel ID, which was stored in my secrets.yaml.

- service: script.notify_slack
  data:
    channel: !secret slack_channel_id_appliances
    message: "Dryer cycle completed!"

While the script was working perfectly, HA apparently cannot handle referencing data via secrets.yaml in automations, and instead needs the direct data.

So the solution was:

- service: script.notify_slack
  data:
    channel: "ABCDEFGHIJKL"
    message: "Dryer cycle completed!"

Hope this will help!

Removing all !secret text was successfully for me!