Automation trigger with math?

Hi, I’m trying to make an automation using the rest of the values os 2 diferent sensors but can’t find info how to do it.
Something like when outside_temp - inside_temp > 10
or

trigger: template
value_template: “{{ sensor.inside - sensor.outside > 10 }}”

I found this and work ok.

Automation with math between 2 sensors?