The Xiaomi Home Assistant integration offers a convenient way to control and monitor various smart devices from a single platform. However, some users may encounter an issue where the integration process hangs on the 'grant permissions' step, preventing the successful installation of the integration. This article aims to provide a detailed explanation of the problem, its possible causes, and a step-by-step guide to resolve the issue. The problem typically occurs when the location associated with the Mihome app account is not listed in the available options during the installation process in Home Assistant. To reproduce the issue, follow these steps:
1. Go to Integrations in Home Assistant.
2. Find and install the Xiaomi Home integration.
3. Accept the risks associated with the integration.
4. Choose a 'Login Region' from the available options, noting that the correct login location may not be listed.
5. Click on 'Click here to login' and proceed to the browser to enter credentials.
6. Press 'agree and link' to grant permissions. However, the page may hang and fail to load or redirect back to Home Assistant, resulting in the integration not being installed. The expected behavior is for the integration to log in and authenticate successfully, linking the existing account to Home Assistant. To resolve this issue, ensure that the location in the Mihome app associated with the account is correctly configured and available in the options during the installation process. Additionally, verify that the internet connection is stable and that the Home Assistant logs do not indicate any errors. If the issue persists, consider seeking further assistance from the Home Assistant community or Xiaomi support. By following these steps and troubleshooting tips, users should be able to successfully install and integrate their Xiaomi Home devices with Home Assistant, enhancing their smart home experience.