This should help you get started.
alias: example
triggers:
- trigger: template
value_template: >
{{ states('sensor.bottom') | float(0) - states('sensor.top') | float(0) > 20 }}
for:
minutes: 5
conditions: []
actions:
- action: notify.whatever
data:
title: 'WARNING Overheating detected'
message: 'Check stove. It may have been left on.'