More complex triggers?

Hi Shramik,

I have been working with the REST API that you pointed out to me. I can now read temperature from various sensors with the REST API, calculate their average and if they’re within a certain threshold, I want to turn on a fan. Using the cayenne dashboard, I’m using a slider to switch between 0 and 1 to turn the fan on and off. (using the button somehow didn’t work for me).
But, I’m now attempting to use the REST API to send a publish event to switch the slider from 0 to 1, however the esp8266 is not picking up on the change in state, even though if I refresh the Cayenne dashboard I can see that the slider has switched from 0 to 1.

In the publish event, I’m sending the device_id, channel, value, unit and type. For unit and type, I’m using unit = “Analog” and type =“analog_actuator” for the slider. Unfortunately, this doesn’t seem to work. Am I using the correct unit and type for the slider? I’m using the information found here: Data types for Cayenne MQTT API

Thanks