Hey everyone, I wanted to share a quick tip that might help others who are experiencing issues with their Xiaomi wall switches not retaining their state after a restart. I recently came across this problem and found a simple solution that works perfectly.
First, I noticed that whenever I restarted my Home Assistant instance, the state of my Xiaomi wall switches would reset to off, even if they were previously on. This was a bit frustrating, especially since I rely on these switches for various automation tasks throughout my home.
After doing a bit of research, I discovered that this issue can be resolved by adjusting the configuration of the Xiaomi Miio component in Home Assistant. Here’s how you can do it:
- Go to your Home Assistant settings and navigate to Configuration > Integrations.
- Find the Xiaomi Miio integration and click on it.
- Look for an option called Restore state from attributes and enable it.
- Save the changes and restart your Home Assistant instance.
This adjustment tells Home Assistant to restore the state of your Xiaomi devices based on their attributes, which means that even after a restart, your switches will remember their previous state. It’s a small tweak, but it makes a big difference in terms of functionality and user experience.
I hope this tip helps someone else who’s dealing with the same issue. If you have any questions or need further clarification, feel free to ask!
Happy automating! ![]()