## Introduction to Xiaomi Home Assistant
The Xiaomi Home Assistant is a cutting-edge smart home system designed to integrate and control various Xiaomi devices, including air purifiers, thermostats, and security cameras. However, like any complex system, it can sometimes encounter issues that affect its performance and usability.
## Understanding the Problem
A specific problem has been identified with the Xiaomi Air Purifier 5, where clicking the "Custom Attributes Running Mode Switch" button results in a series of beeps, followed by a self-test and automatic reboot. After the reboot, there is a high probability that the UV lamp will turn off automatically. This issue emerged after a firmware update that introduced smoke alarm functionality.
## Steps to Reproduce the Issue
1. Click on the "Custom Attributes Running Mode Switch" button for the Xiaomi Air Purifier 5.
2. The device will beep 2-3 times, switch running modes, and initiate a self-test.
3. Upon completion of the self-test, the device will automatically reboot, and the UV lamp will likely turn off.
## Expected Behavior
The expectation is that the running mode switch button functions normally without causing the device to self-test, reboot, or turn off the UV lamp.
## Troubleshooting and Resolution
To address this issue, several steps can be taken:
- **Check for Firmware Updates**: Ensure that the Xiaomi Air Purifier 5 and the Home Assistant system are running the latest firmware and software versions.
- **Review System Logs**: Examine the Home Assistant logs for any error messages related to the Xiaomi integration or the air purifier device. This can provide clues about what might be causing the malfunction.
- **Reset Device Settings**: If possible, reset the air purifier’s settings to their default values to see if this resolves the issue.
- **Contact Support**: Reach out to Xiaomi support or Home Assistant community forums for further assistance. They may have encountered similar issues and can offer specific solutions or patches.
## Conclusion
The Xiaomi Home Assistant offers a powerful platform for managing smart devices, but occasional glitches can occur. By methodically troubleshooting and potentially updating firmware, reviewing system logs, resetting device settings, or seeking support, users can overcome these challenges and enjoy the full benefits of their smart home system.