Automation to turn on fan when Temperature is lower than Thermostat target

Go to Developer Tools → Template to test yout trigger template.

Go to developer Tools → States to make sure you have the correct entity_ids and attribute.

Units?

Also regarding your action: Why and how to avoid device_ids in automations and scripts