Skip to content

Script Entity ID not Updating when Changed #14140

Description

@Daniel-dev22

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.

Describe the issue you are experiencing

If I create a script, rename the script entity id from the entities menu, the entity id is not renamed in the scripts.yaml.

The auto generator when you type will suggest the renamed entity_id and script name but it's not actually the correct entity id because when the script is called it says the script is not found.

Describe the behavior you expected

If a user renames a script entity_id from the entities page that it will update the script in scripts.yaml

Steps to reproduce the issue

  1. Create Script
  2. Change entity_id from entities page
  3. Attempt to use script from an automation or service call in developer tools.
  4. Check scripts.yaml and see the script entity_id never changed.
    ...

What version of Home Assistant Core has the issue?

2022.10.4

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

I think this is expected behavior because it used to give an error when doing this but now it doesn't do the user assumes it actually changed the entity_id when it didn't.

Problem-relevant frontend configuration

new_script:
  alias: Master Lights Script
  sequence:
  - service: light.turn_{{ set_light }}
    target:
      entity_id: '{{ target_lights }}'
    data: '{{ light_setting }}'
  mode: parallel


I renamed that entity_id only to find it was never renamed in scripts.yaml and only renamed in the frontend/entities page.

Javascript errors shown in your browser console/inspector

No response

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    staleThis has been marked as stale by the automated bot

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions