Want to convert multiple custom component switches to lights?

Testing out a custom component which adds sonoff as switches to HA using ewelink API.
Want to convert them automatically to light.xxxx from switch.xxxxx when they’re added.
Was looking for a simple automatic template/script like solution.

Thanks in anticipation