I am using a Sparkfun 8266 Thing board with a PIR sensor. I am using the CayenneMQTT8266 library. I can configure a custom widget to display the results of a virtualWrite, but I cannot get a trigger to function from that virtualWrite value. If I instead use a luxWrite the trigger will work, but then I can’t get rid of the unit display (“lux”).
i.e. virtualWrite(2, digitalRead(4)); -> displays correctly but will not trigger
luxWrite(2, digitalRead(4)); -> will display and trigger
trigger is configured as sensor above 0
I noticed that there are virtualWrite overloads that allow you to set Type and Unit
e.g. Cayenne.virtualWrite(3, 50, TYPE_PROXIMITY, UNIT_CENTIMETER);
Is there an equivalent for a digital sensor Type?