Automation trigger based on remaining time in LG dryer cycle

I have an LG combo washer/dryer and I find that if I pull my clothes out around 10 minutes before the drying cycle is due to finish then there’s virtually no static in them - which is awesome as long as I can catch it.

With the LG ThinQ integration installed, it’s easy to create an automated notification that triggers when remaining time changes to exactly 10 minutes:

trigger:
  - platform: state
    entity_id: sensor.combo_remaining_time
    to: "0:10:00"

That works, but naturally sometimes the remaining time jumps straight to something less than 10 minutes, so the automation doesn’t trigger. I’ve tried simply prepending a less than sign to the trigger, but that appears to do nothing:

trigger:
  - platform: state
    entity_id: sensor.combo_remaining_time
    to: <0:10:00

And of course I’m sure what I really want is some thing like this, so that it doesn’t trigger over and over again on every update below 10 minutes:

trigger:
  - platform: state
    entity_id: sensor.combo_remaining_time
    to: <=0:10:00
    from: ">0:10:00"

So it seems that greater and less than operators aren’t interpreted when applied to time, at least not when time is expressed in the x:xx:xx format.

I suspect this is relatively simple to do, but I’m pretty new to HA and YAML, and extensive googling and searching of these forums hasn’t turned up anything quite like what I need, so I would really appreciate some advice!

You can use this template trigger

{% set s = states('sensor.combo_remaining_time')  %}
{% set t = s.split(":") %}
{{ (t[0] | int * 60 + t[1] | int) <= 10}}

Thanks, that seems to have worked perfectly! I’m curious though why it doesn’t trigger again when the remaining time drops from (for example) 9 minutes to 6 minutes? I see that it does seem to “reset” if the remaining time climbs above 10, so it triggers when it drops below 10 again - which is exactly what I want - but I’m surprised I didn’t have to mess around with helpers or something to keep it from triggering each time it drops farther below 10 minutes.

For future searcher’s reference, here’s the whole trigger statement:

trigger:
  - platform: template
    value_template: >
      {% set s = states('sensor.combo_remaining_time')  %}    
      {% set t = s.split(":") %}    
      {{ (t[0] | int * 60 + t[1] | int) <= 10}}

The template acts as a boolean itself.