Aliases for entities created in YAML

I have some entities which I have set up in YAML - specifically some rest switches - which I want to assign aliases, for use with assist. But I can’t set the aliases up via the UI, because the entities don’t have an ID; and I can’t give the entities an ID, because you can’t set up rest switches via the UI.

Is there a way around this that doesn’t involve setting up custom sentences or intents?