Zha somehow gets corrupt when doing a reboot system + workaround

It took me a while, but I was able to reproduce. Somehow my zha got corrupt yesterday and I wasn’t able to recover (it stayed in an endless initialising loop). I run HassOs on a proxmox server and did some modifications and a full reboot (using the reboot system in the advanced section).

After that my ZIgbee Home Automation Integration seemed corrupt (somehow it’s database didn’t flushed correctly???)

Luckily I made a backup and restoring that fixed it. Everything back to normal.

That triggered me to do the same reboot and again a corrupted zha integration.

Backup restored and everything was back normal.

Then I did the following: disable zha integration, reboot system, wait till everything comes up, re-enable zha integration and that works!

Something’s clearly wrong when doing a “reboot system” with zha running.