Why is a Zigbee gate being searched?

I have a bunch of temperature/humidity Xiaomi sensors which work fine out of the box (they are autodiscovered as sensors and provide correct readings).

I then got a Xiaomi Smart Water Sensor and in order to have it work, I had to enable the Xiaomi Aquara platform (otherwise it was not discovered - at least the water sensor part, the battery was):

xiaomi_aqara:
  discovery_retry: 5

Now the water leak information is visible but at the same time I get in the startup logs a lot of warnings:

2019-03-03 10:00:51 INFO (SyncWorker_14) [homeassistant.components.xiaomi_aqara] Discovering Xiaomi Gateways (Try 2)
2019-03-03 10:00:56 WARNING (MainThread) [homeassistant.setup] Setup of xiaomi_aqara is taking over 10 seconds.
2019-03-03 10:00:56 WARNING (MainThread) [homeassistant.components.media_player] Setup of platform ue_smart_radio is taking over 10 seconds.
2019-03-03 10:00:56 INFO (SyncWorker_14) [xiaomi_gateway] Gateway discovery finished in 5 seconds
2019-03-03 10:00:56 INFO (SyncWorker_14) [homeassistant.components.xiaomi_aqara] Discovering Xiaomi Gateways (Try 3)
2019-03-03 10:00:59 INFO (MainThread) [homeassistant.setup] Setup of domain media_player took 12.4 seconds.
2019-03-03 10:00:59 INFO (MainThread) [homeassistant.loader] Loaded media_player.cast from homeassistant.components.media_player.cast
2019-03-03 10:00:59 INFO (MainThread) [homeassistant.components.media_player] Setting up media_player.cast
2019-03-03 10:01:01 INFO (SyncWorker_14) [xiaomi_gateway] Gateway discovery finished in 5 seconds
2019-03-03 10:01:01 INFO (SyncWorker_14) [homeassistant.components.xiaomi_aqara] Discovering Xiaomi Gateways (Try 4)
2019-03-03 10:01:06 INFO (SyncWorker_14) [xiaomi_gateway] Gateway discovery finished in 5 seconds
2019-03-03 10:01:06 INFO (SyncWorker_14) [homeassistant.components.xiaomi_aqara] Discovering Xiaomi Gateways (Try 5)
2019-03-03 10:01:11 INFO (SyncWorker_14) [xiaomi_gateway] Gateway discovery finished in 5 seconds
2019-03-03 10:01:11 ERROR (SyncWorker_14) [homeassistant.components.xiaomi_aqara] No gateway discovered
2019-03-03 10:01:11 INFO (MainThread) [homeassistant.setup] Setup of domain xiaomi_aqara took 25.1 seconds.
2019-03-03 10:01:11 ERROR (MainThread) [homeassistant.setup] Setup failed for xiaomi_aqara: Component failed to initialize.

What is this and why is there a gateway being searched for? (especially that the water sensors works great)

Because it took 5 tries before communication was established with your gateway.

I see No gateway discovered and Setup failed for xiaomi_aqara: Component failed to initialize. and I do not have any gateway (except if a device itself is a gateway)

Sorry I might have misread, I looked at your post on my phone - not ideal.

You do have a gateway, I am not sure why you are getting these messages. Perhaps because you haven’t set up a key? (The key is not needed for sensors, only devices you want to control.)

I believe that I made a mistake by declaring the gateway. My understanding was that the gateway was needed to use the Aqua Smart Sensors.

What it actually states is that a gateway declared in HA supports them (but is not needed). My misunderstanding was coming from the fact that when I added the device, its status did not show up (except for the battery). I realized that, as opposed to the temperature sensors, it will not send anything except if there is a leak (= when I short circuit the sensors).

It now works (without the gateway, in the same way as other sensors)