How to assign your own entity_id to a switch?

After a lot of reading I took the plunge and started with Home Assistant. (HASSIO on RPi). Of course I had to plow through a number of YAML configuration issues, most my own fault. But a few took me by surprise. E.g. the entity_id assigned to a switch by the system. I used Hungarian notation in my labels like ChzKitchen (central heating zone Kitchen). Added a switch for the corresponding distributor valve in the configuration.yaml with name: “ChzKitchen” in its spec. Went OK!
Next I wrote an automation using the same name for the entity_id. Did not work, the system had assigned chzkitchen as the entity_id and names within the system are case sensitive. ChzKitchen seems to serve only as the friendly name. Tried to force a system name by adding a ChzKitchen: label to the switch specification, but that was not accepted by the configuration.yaml checker. How do I force my own entity_id for a switch in the configuration.yaml?

Entity IDs must be lower case and not contain spaces.

You can change the friendly name of the switch ( the name displayed in the frontend web interface). You dont say what sort of switch you are using. Some support the name: attribute. Check the component page for your switch. If it does not support name: then you can use Customize:

Thanks for the prompt reply. I deduced that already. The MQTT switch in question has the name: attribute, but that I did set to chzKitchen and it turned out to be only the friendly name. The entity_id became chzkitchen. Turning the assigned name to chzkitchen in both the Switch config and in the automation solved my problem with the automation. But I did not appreciate the fact that I lost the Hungarian notation for the name in the process. So I hoped that I had overlooked some configurator detail. Now I will stick with all lowercase names without spaces inbetween. Customizing the name would cause a different name to be the active name than the one provided in the configuration.yaml, a fact that could easily become a source of confusion in a later stage.