How to force an entity_id of a MQTT switch?

I am creating MQTT switches via MQTT discovery and it works great.

The problem I am having is when I change the name of the switch and push autodiscovery again, the name is updated in HA but the entity_id is not (it is built based on the first name and stays as it).

Is there a way to force a change of an entity_id via autodiscovery?

I don’t know the answer to the basic question (I don’t use discovery for MQTT stuff) but you can change the entity_id in the entities page of the configuration menu.

Yes, I know - I was looking for the programmatical, MQTT-based way to do that