When I need to use an entity in a yaml file I try to copy-paste the entity name but it is quite difficult. I go into Settings\ Devices and Services\Entities but the Entity ID is often tuncated if too long and the copy-paste doesn’t work everytime.
So I need to open the entity and then again click on the setting wheel and now I can copy the entity name.
Be sure to vote for your own post.
Can you illustrate your issue with screenshots?
That menu isn’t designed for copying an entity_id.
Use Developer Tools → States. There’s even an icon next to the entity’s entity_id that conveniently performs a copy operation.