frontend icon indicating copy to clipboard operation
frontend copied to clipboard

Automation Issue with !secret tag

Open meluvalli opened this issue 1 year ago • 1 comments
trafficstars

Checklist

  • [X] I have updated to the latest available Home Assistant version.
  • [X] I have cleared the cache of my browser.
  • [X] I have tried a different browser to see if it is related to my browser.
  • [X] I have tried reproducing the issue in safe mode to rule out problems with unsupported custom resources.

Describe the issue you are experiencing

If you use the tag "!secret" to reference secrets.yaml in automations.yaml, you receive an error in FE saying "This automation cannot be edited from the UI, because it is not stored in the automations.yaml file, or doesn't have an ID."

Describe the behavior you expected

This error shouldn't be there and the automation does have ID's associated with them. If you remove all references from !secret, this problem goes away.

Steps to reproduce the issue

  1. Create automation in YAML.
  2. Reference !secret yaml in automation.
  3. Save automation and reload.
  4. Go to FE Settings/Automations.
  5. Select any automation and it'll show the error. ...

What version of Home Assistant Core has the issue?

2024.2.3

What was the last working version of Home Assistant Core?

No response

In which browser are you experiencing the issue with?

All (N/A)

Which operating system are you using to run this browser?

N/A

State of relevant entities

No response

Problem-relevant frontend configuration

- alias: Security Arm Stay Switch
  id: 958c51c9d9104e5294da50a083645bd7
  trigger:
    - platform: state
      entity_id: input_boolean.security_arm_stay
      to: "on"
  action:
    - service: alarm_control_panel.alarm_arm_home
      data:
        entity_id: alarm_control_panel.home_alarm_system
        code: !secret alarm_code
    - service: lock.lock
      entity_id: lock.b051mxjg_lock_mechanism

Javascript errors shown in your browser console/inspector

No response

Additional information

FYI: This was also reported in the community forum.
https://community.home-assistant.io/t/this-automation-cannot-be-edited-from-the-ui/557254/3

meluvalli avatar Feb 24 '24 15:02 meluvalli

After migrating automations forget about using yaml features like secrets, include, anchors, packages. Consider this as similar to a "storage mode" of Lovelace.

ildar170975 avatar Feb 24 '24 15:02 ildar170975

Glad to see someone created an issue for this - it would be excellent if secrets were allowed within the editor since Home Assistant is very focused on the UI/UX of things. At the very least, there should be a more descriptive error than Response error: 500

Midnitte avatar May 01 '24 19:05 Midnitte

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

github-actions[bot] avatar Jul 30 '24 20:07 github-actions[bot]

I'm not sure there would be much appetite for reworking how automations work, but this issue still persists - would it be possible to have it generate a descriptive error when secrets are used?

Midnitte avatar Jul 30 '24 20:07 Midnitte