Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Creating a new script may overwrite an old script without warning #20777

Closed
3 of 4 tasks
karwosts opened this issue May 11, 2024 · 0 comments · Fixed by #20791
Closed
3 of 4 tasks

Creating a new script may overwrite an old script without warning #20777

karwosts opened this issue May 11, 2024 · 0 comments · Fixed by #20791
Assignees

Comments

@karwosts
Copy link
Contributor

karwosts commented May 11, 2024

Checklist

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

Describe the issue you are experiencing

It is possible that creating a new script, and giving it the same name as an existing script, will overwrite the existing script without warning.

Describe the behavior you expected

Prevent overwriting an existing script.

Steps to reproduce the issue

  1. Create a new script. For name, enter overwrite_me. The entity_id will autopopulate with script.overwrite_me. Assign some actions and save.
  2. If you try to repeat # 1 again at this point, the entity_id will automatically be assigned script.overwrite_me_2, and the unique_id will be overwrite_me_2. So far, so good, nothing lost.
  3. Open the more info for script.overwrite_me. Rename the entity_id to something else. The entity id changes, but the unique_id remains overwrite_me.
  4. Now that the entity_id has changed, try creating a new script again named overwrite_me. It will be assigned entity_id script.overwrite_me, and unique_id again overwrite_me. Save this script, and the original script from step # 1 will be obliterated.

What version of Home Assistant Core has the issue?

2024.5

What was the last working version of Home Assistant Core?

No response

In which browser are you experiencing the issue with?

No response

Which operating system are you using to run this browser?

No response

State of relevant entities

No response

Problem-relevant frontend configuration

No response

Javascript errors shown in your browser console/inspector

No response

Additional information

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant