Have you checked you network is performing correctly
The reason i say this is that i had the same issue with sensors going unavailable all the time
i changed my 2.4g network to the lowest channel as my xiaomi gateway was at zigbee 25 frequency and this was overlapping with wifi channel 11.
Since moving to the lowest WiFi channel i have had no issues for the last month.
Have a read of this article as i found it useful in the zigbee/WiFi channel overlapping issue.
also look at this thread on how to see what zigbee channel your gateway is on.
hope this helps