Use unique id for script
Proposed change
Use unique id for script instead of computed object id
Type of change
- [ ] Dependency upgrade
- [x] Bugfix (non-breaking change which fixes an issue)
- [ ] New feature (thank you!)
- [ ] Breaking change (fix/feature causing existing functionality to break)
- [x] Code quality improvements to existing code or addition of tests
Example configuration
Additional information
Unique ID is not in hass.entities. We have to call the extended entity registry entry to get the unique_id. Is there a reason for that ?
- This PR fixes or closes issue: fixes #
- This PR is related to issue or discussion:
- Link to documentation pull request:
Checklist
- [ ] The code change is tested and works locally.
- [ ] There is no commented out code in this PR.
- [ ] Tests have been added to verify that the new code works.
If user exposed functionality or configuration variables are added/changed:
- [ ] Documentation added/updated for www.home-assistant.io
Shouldn't we fetch the unique id once when opening the editor and use that for all actions instead of fetching it for every action?
Shouldn't we fetch the unique id once when opening the editor and use that for all actions instead of fetching it for every action?
Do you think unique_id can be exposed in hass.entities by the back-end so we don't have to deal with async.
Do you think unique_id can be exposed in hass.entities by the back-end so we don't have to deal with async.
Yes, we should be able to do that
Async calls can be removed with https://github.com/home-assistant/core/pull/78945
Parent has been merged.