Just want to add that you can now setup your own zigbee gateway. This way you can use Xiaomi /Aqara switches and sensors without their special gateway. Cheaper, more convenient, has better integration with HA and less likely to break if Xiaomi decide to change firmware/app.
See