Template sensor entity_id should be able to be set in YAML, not just in the UI

For some reason you cannot set the entity_id of template sensors in YAML, you can set it in the UI. For other sensors you can also set the entity_id in YAML, this should also be possible for template sensors.