Automation trigger for x time

The state trigger have the possibility to take in consideration the time since the state was in that position.
Is there any chance to have the same for the numeric state? I need to fire an alarm if a temperature is over some degrees for some time and this feature will help a lot.
Thank you

Will conditions work?

  condition: state
  entity_id: device_tracker.paulus
  state: not_home
  # optional: trigger only if state was this for last X time.
    hours: 1
    minutes: 10
    seconds: 5

For the state is ok, but I need for numeric state.
Thank you

Onviously the numeric_state trigger will be required for your numeric range:

You could then fire a script and specify a delay for the period of time you want prior to executing the notification or action etc.

If the state changes within the time period you could have an automation that detects the change and uses script.turn_off to cancel the script that was running your delay before firing the action.

Not sure if the is an easier way but this would work.

Of course I can trigger a state, then use the state in combination with the “for” feature, but it will be nice if it can be included into the HA core.