Please follow Community guideline #11 and format your cobe blocks properly… the forum software does weird things and it can be difficult to determine the source of the error.
With that in mind, it looks like your templates are missing their curly braces {{ }}.
I would probably just use template triggers instead of triggering on every state change:
alias: Update TankSwitch
description: ""
trigger:
- id: 'on'
platform: template
value_template: |
{{ states('sensor.sonoff_1001e23ad2_temperature') | float -
states('sensor.sonoff_100114a710_temperature') | float >= 10 }}
- id: 'off'
platform: template
value_template: |
{{ states('sensor.sonoff_1001e23ad2_temperature') | float -
states('sensor.sonoff_100114a710_temperature') | float <= 5 }}
condition: []
action:
- service: switch.turn_{{ trigger.id }}
target:
device_id: 69041622535e34621d9284d28b74abe7
- service: logger.log
data:
message: Switch Turned {{ trigger.id|title }}!