Using the PIC IoT as a temperature controller

I’d like to use the PIC IoT as a temperature controller. I have the Relay Click from MickroE in the mikroBUS slot and I bridged the 0 ohm R204 pads to get the 5Vdc to the Click. I can toggle the relay from an Interval timer, so I know that part works.

I have a cloud command set up to trigger on a condition above a certain temperature level. I have a fan connected to the Relay click - Relay 1. The Relay turns on when the temperature gets to that level, but it doesn’t turn off when the fan brings the temp goes back down. Can I use one Cloud Command to turn it on and another to turn it off?
Thanks
PIC-IoT WG Onboard Sensor Relay on off.atmo (57.7 KB)

Tried an Embedded Comparison element to evaluate the Cloud Command 0 for off and 1 for On. Seems to work.