frontend icon indicating copy to clipboard operation
frontend copied to clipboard

Use unique id for script

Open piitaya opened this issue 3 years ago • 3 comments

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:

piitaya avatar Sep 19 '22 17:09 piitaya

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?

bramkragten avatar Sep 21 '22 08:09 bramkragten

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.

piitaya avatar Sep 21 '22 12:09 piitaya

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

bramkragten avatar Sep 21 '22 13:09 bramkragten

Async calls can be removed with https://github.com/home-assistant/core/pull/78945

piitaya avatar Sep 26 '22 07:09 piitaya

Parent has been merged.

frenck avatar Sep 28 '22 08:09 frenck