Wait for recorder migration
New logic to wait until the recorder migration process is done.
Additional details: Recorder migration is typically running when upgrading to a new major version of Home Assistant. The migration process can take a considerable amount of time. It's not possible to restart Home Assistant during the migration process (rightfully), which is required by the patching process. The solution is to wait for the recorder migration process to complete, and only then execute the patching process, including a restart when needed.
Full Changelog: v1.6.0...v1.7.0