I have this simple part of my code to send data from an ds18b20 to thinger.io:
void setup() {
thing["temp"] >> [](pson & out) {
sensors.requestTemperatures();
out["TEMPERATURA"] = sensors.getTempCByIndex(0);
};
sensors.begin();
}
void loop(void) {
thing.handle();
}
My question is how to send a null or error value wen the sensor is disconected.
ds18b20 sends -127 in error cases, how could I show it in a dashboard or bucket?
Thanks in advance!