Switch as Light helpers permanent?

Is there a way to make these permanent?
I have situation where I test multiple firmwares for a Zigbee coordinator and many times the z2m has to be restored from backup. This leads to loss of al Light helpers and I have to recreate them in the GUI.
Is there anything to make them stay even when underlying switch get removed in MQTT?

As an alternative, this still works (from my own config). It’s now unsupported though.

light:
  - platform: switch
    name: living_room_lamp
    entity_id: switch.living_room_lamp

The more longwinded way would be to make a template light.

More details here: Switch as Light - from yaml (Change device type - switch_as_x).

Vote for this feature: Request to add yaml option to manually configure helper "Change device type of a switch"

The FR section is about to be closed down, so these should now be logged on GitHub. I didn’t search: Someone might’ve logged this one already (there will be no migration of FRs from the forum).

I will add alternative solution that does exactly what I wanted for my use-case. In case you use Zigbee2MQTT, there is a piece of configuration that solves this without HA helpers via MQTT-HA discovery protocol:
Put this in the devices section of you configuration.yaml:

'0x54....':
  friendly_name: kitchen_switch_front_1
  homeassistant:
    device:
      suggested_area: Kitchen
    switch:
      type: light
      object_id: light
    light:
      name: Countertop LED
      icon: mdi:led-strip-variant
      state_value_template: '{{ value_json.state }}'

Source: Home Assistant | Zigbee2MQTT