Automation if repair x is available

I have an issue with HA, so that if at startup there is no internet all internet based services like HomeKit or Pushover will fail, even if there is internet later on. HA is accessible through local network.

Since despite my report this won’t be fixed or can’t be reproduced I need to fix that myself.

One way is to wait a minute so that after a power outage the HA is not ready before the internet is.
But this is unreliable since the internet can take longer. Also it makes restarts unnecessarily slow.

I do get a repair message at startup telling me that Pushover isn’t ready:

Die Automatisierung "System - Home Assistant startet" (automation.home_assistant_start) hat eine Aktion, die einen unbekannten Dienst aufruft: notify.pushover.

If I could check for that error/repair containing "automation.home_assistant_start", I could just restart HA after a delay until it works again.

Is this possible?

Found a solution:

  alias: Internet Fix
  description: ''
  - platform: event
    event_type: system_log_event
    event_data: {}
  - condition: template
    value_template: '{{ ''Unable to find
      service notify.pushover'' in[0] }}'
  - condition: template
    value_template: '{{ ( now() - states(''sensor.uptime'')|as_datetime ).seconds
      < 60 }}'
  - service: homeassistant.restart
    data: {}
  mode: single

This code needs to be in configuration.yaml:

  fire_event: true

And yes, if the internet stays offline HA keeps restarting.

But it won’t restart if Pushover fails after startup (+60 seconds).

What would be nice is to remove the “repair message” with a script as well. is this possible?