Check config before host reboot

Hi there, on my raspberry pi (3B+ I guess) I am facing the issue, that the Bluetooth adaptor/integration is not able to load properly. It is suggested to power cycle the device and actually a simple reboot usually does the trick already. So I figured I might automate this issue only to realise although there is both a service to check on the configuration and to reboot the host (not restart homeassistant), I could not find a hint that rebooting is automatically checking the configuration as restarting does.
Would anyone know a clever workaround maybe?
I consider myself advanced but not expert in homeassistant, so I could need a helping hand with the following idea:

  1. Perform configuration check, if it fails it should generate a persistent notification
  2. Check for the persistent notification (how???)
  3. If no event found, perform reboot

Cheers!

Instead of doing a workaround, why not fix the issue? Some cheap ESP32 bluetooth proxies would probably enable you to stop using the built in Bluetooth.

The BT in a raspi is not meant for long range usage. It gets interference from the other chips on the board. The intention for it is short range to a keyboard, mouse, speaker, etc, not across the room.
As fleskefjes says, use proxys.

Alright, fair enough. Thank you both! I will setup some to fix the issue at hand.

However leaving that out of the equation for a moment, is there any way to reboot the system in case “some” defect has been triggered/identified and still making sure, the configuration is valid?