Making a switch is not a problem. That’s just a little UI and a systemd unit.
Writing something that does all the switching in a stable, reliable, reversible way, for all supported devices, is the complicated part.
I predict this is going to remain a community hack, although jolla has stated they were looking into options for this.