Automation condition - only trigger if a sensors uptime is greater than X secs

I have an ESP32-based doorbell that randomly disconnects WiFi for a few secs throughout the day. My attempts to overcome the issue in the ESP YAML have been unsuccessful.

To minimize the disruption, I thought to add an AND condition to the buzzer automation to check whether that Uptime is greater than say 5 secs. If not, it avoids triggering the doorbell buzzer.

The sensor.doorbell_uptime gives an output of “unavailable” or a “hh:mm:ss” uptime readout.

The below excerpt is my attempt, I am unclear whether the use of numeric state and time work together or whether 5 seconds is represented as shown.

Can anyone direct me or suggest better ways to add a ‘greater than’ time-based condition?

condition: and
conditions:
 - condition: numeric_state
    entity_id: sensor.doorbell_uptime
    above: 5

The sensor reports uptime in seconds so that should work.

Keep in mind though that the uptime sensor only updates every 60 seconds by default. You can change this but if you do, to prevent flooding your network with updates every second, you should automate this in the ESPHome device and keep the sensor internal to the device.

Tom - thank you!