aqara hub m2 with yeelight lighting

Hi, does the Yeelight legacy lighting work with the aqara hub m2? I’m thinking about going from the Xiaomi gate, but since I have a lot of Yeelight lights, I don’t know if it will work.

Which lights? Most (if not all) of the Yeelight lights are Wifi, so it has nothing to do with the hub.

inter alia Ceiling light 650, old type bulbs, LED strips. At the moment, each of these devices must be connected to the Xiaomi gate to turn on / off using switches or motion detectors

I expressed myself a bit wrong. I have all the lighting connected to the Mi Home applications and I wonder if I can achieve the same in the Aqara Home application