## Introduction to Xiaomi Home Assistant
The Xiaomi Home Assistant is a smart home system that integrates various devices, including lights, to provide a seamless and convenient experience for users. However, with the release of version 0.4.0, some users have reported an issue where the lights' state is no longer updated in the system.
## The Bug: Lights State Not Updating
In previous versions of the Xiaomi Home Assistant, when a light's physical switch was turned off, the light's state would be updated to 'unavailable' after a short period, usually less than 5 minutes. However, in version 0.4.0, the state remains as 'on', even when the light is turned off. This can cause confusion for users who rely on the system to monitor and control their devices.
## Reproducing the Bug
To reproduce this bug, users can follow these steps:
1. Turn off the light's physical switch.
2. Check the light's state on the home assistant after 5 minutes.
## Expected Behavior
The expected behavior is for the light's state to change to 'unavailable' after the physical switch is turned off.
## Troubleshooting
To troubleshoot this issue, users can check the Home Assistant logs for any errors or issues related to the Xiaomi Home Integration. The log timezone is set to Asia/Singapore, and the Home Assistant Core version is 2025.7.3. The Home Assistant Operation System version is 16.0, and the Xiaomi Home Integration version is v0.4.0.
## Conclusion
The bug where the lights' state is not updating in version 0.4.0 of the Xiaomi Home Assistant can cause inconvenience for users. By following the steps to reproduce the bug and troubleshooting the issue, users can hope to resolve the problem and enjoy a seamless smart home experience.
## Recommendations
To resolve this issue, users can try restarting the Home Assistant system or checking for updates to the Xiaomi Home Integration. If the problem persists, users can report the issue to the developers for further assistance.