Lets encrypt addon - when it detects a change of certificate it restarts core

Currently it is recommended to set a daily scheduled task to restart the letsencrypt addon. This way if the SSL certificate needs to be renewed it will be renewed automatically. But once renewed it is necessary to manually restart HA core. I think you could give the option that the addon itself makes the execution of this restart so that only once every 3 months renew the certificate and publish it. How do you see it?

Just a sensor that turns true when a new certificate is downloaded, like sensor.let_s_encrypt_restart_needed

It would be easy to make an automation based on that then.

But maybe it is already possible to monitor the ssl file for changes and react on that.
The files should be overwritten when updated, it is just HA that can only read them at start up.

Edit: Maybe this can be used: Folder Watcher - Home Assistant

I finally created my own script, here’s how I did it