Send notification if MQTT sensor is not available for X minutes

I have several WiFi sensors and I want to know if their availability changes, i.e.

- id: water_level_sensors_unavailable
  initial_state: true
  alias: Water level offline
  trigger:
    platform: mqtt
    topic: home/waterlevel/availability
    payload: offline
  action:
    service: notify.pushbullet
    data:
      message: Water level sensor not available!

- id: water_level_sensor_available
  initial_state: true
  alias: Water level online
  trigger:
    platform: mqtt
    topic: home/waterlevel/availability
    payload: online
  action:
    service: notify.pushbullet
    data:
      message: Water level sensors available!

The problem is often they disconnects for a while and I receive a lot of useless notifications. Instead, I want to receive a notification only if they stay disconnected for, say, 10 minutes.

If it was a binary sensor I could use the ‘for’ clause in the trigger section. But in this case I don’t know what to do.

I just use input_booleans for the last will topic but I want to have it in my frontend anyway.