The thing with " vs ', is that I save it with single quotes, but after restart it gets translated to double quotes.
Edit: I removed and re-paired the device after the Z2M restart. I’ve also restarted Z2M without re-pairing and it still shows up as switch.my_switch instead of light.my_switch
Edit2: Well, this is odd. Looks like /config/zigbee2mqtt/devices.yaml does not have my changes from the Z2M addon?
Just for future reference, if you are editing the configuration.yaml, this must be done with Z2M down, otherwise it will overwrite your settings again.
I confirm that the configuration.yaml is the right place to make the adjustments. It worked for me with first stopping the Z2M add-on, editing the config, and then restarting the add-on together with reloading of the HA configuration.