Trigger an automation if another automation has not run for 15 minutes

I would like to schedule an automation to run if another automation has not been triggered for 15 minutes.

My use case is as follows. I have a remote device checking in every 10 minutes and that check in triggers an automation. The check in uses the Tailscale interface. Lets call that a "heartbeat". I have found that occasionally, the Tailscale interface needs to be reloaded (or the "heartbeat" automation is not run. Therefore, I would like to be able to check the "heartbeat" automation - and if it has not been triggered for 15 minutes, I will reload the Tailscale app. I have the reload process figured out - I just can't figure out how to create a trigger based upon another trigger exceeding a "time since"

Thank you in advance for the assistance.

Every automation has an attribute called last_triggered that is a datetime representing the last time when the automation was triggered and the actions were run. You can use a Template trigger to fire when that value represents a time more than 15 minutes in the past:

trigger: template
value_template: |
  {{ now() >= state_attr('automation.YOUR_HEARTBEAT', 'last_triggered') + timedelta(minutes=15)  }}

Thank you very much for the help. I can't try until tomorrow, but will do so and confirm that I understand what to do.

You could also use a simple state trigger to avoid needing templates:

triggers:
  - trigger: state
    entity_id: automation.YOUR_HEARTBEAT
    attribute: last_triggered
    for:
      minutes: 15

The timer resets if Home Assistant restarts or automations reload [ref].

Thank you for all the assistance. Prior to posting the question I had tried the State Trigger method suggested by @Troon , but it did not work for me. Then I tested the scenario again, and it did trigger. I also tried the Template method suggested by @Didgeridrew and that worked as well.

One thing that I discovered in further testing. In the following scenario:

  1. Heartbeat run
  2. Restart HASS
  3. No Heartbeat for over 15 minutes - even if it is over 15 minutes after the restart of HASS.
    In that scenario, the Template trigger ran but the State Trigger did not. I am not totally sure why that would be the case, so although the Template trigger is simpler, is it possible that the State Trigger would be more resiliant?

Anyway, thank you very much for the assistance.

If it's important that your automation runs and doesn't matter if it runs early or too often, you could add triggers for restart and automations reloaded.