The easy way is to use this integration that allows you to share devices from Hubitat to HA via the Maker API. Then you create the virtual switch on Hubitat and expose it to HA.
(I installed it via HACS)
(HADB and the above integration each do one direction of device sharing -- just make sure you don't re-share devices back to the originating platform via the other integration. Doing so would be ... bad)