When has my backup finished

I want to be able to know a backup has been completed.

For example I want to do a backup and then shut HA down or reboot it.

How?

  1. Maybe an extra parameter to the service call to say you want to wait until completion?
  2. A sensor state change
    a) date/time of latest backup ?
    b) backup in progress yes/no ?

Somehow the installation of any HA upgrade, which these days recommends a backup, waits for the backup to complete.