Possible to change type of Switch using configuration.yaml?

The UI has an option to change the type of a switch (in my case to a Fan).

Is it possible to do the same thing in configuration.yaml?
The closest I have been able to get is to use a template fan, i.e.:

template:
  - fan:
    - default_entity_id: fan.bedroom
      name: Fan Bedroom
      state: "{{ is_state('switch.fan_bedroom', 'on') }}"
      turn_on:
      - target:
          entity_id:
          - switch.fan_bedroom
        action: switch.turn_on
      turn_off:
      - target:
          entity_id:
          - switch.fan_bedroom
        action: switch.turn_off

However I dislike this for two reasons:

  1. It’s rather long winded.
  2. It shows up in the helpers list as a Template instead of a Change type of Switch ... (as it would if created via the UI).

Is there a proper way to represent the “Change Type …” in configuration.yaml?

No this is a UI integration only.

Okay - thank you for the confirmation.