Huawei/Xiaomi sleep tracking interrupted

Huawei together with Xiaomi are the most troubled phones on the market, some vendors tent to ignore Android best practices and implement very bizzare custom modification which make background task nearly impossible to run. Please take a look at http://sleep.urbandroid.org/documentation/faq/alarms-sleep-tracking-dont-work/