     buf->concat("^ ~waterLevel3~+ "); buf->concat(m->waterLevel3);
     if(! JSON) buf->concat("\tcm");
   }
+  if(GOT_ANALOG_SENSOR){
+    buf->concat("^ ~analog~+ ");
+    buf->concat(m->analog);
+    if(! JSON) buf->concat("\tanalog");
+  }
   if(JSON) {
     buf->concat(" }");
     buf->replace('~', '"');

      dbg(valveDBG, "; wL2: "); dbg(valveDBG, now->waterLevel2);
      dbg(valveDBG, "; wL3: "); dln(valveDBG, now->waterLevel3);
    }

    flowController.step(now); yield();  // set valves on and off etc.
    if(SEND_DATA) {                     // push data to the cloud

  dln(monitorDBG, " cm, ");
  return;
}
void getAnalog(float* a) {
  if(! GOT_ANALOG_SENSOR) {
    (*a) = 0.0;
  } else if(analogSensor == "analog_mains") {
    (*a) = 1.0;
  } else if(analogSensor == "analog_pressure") {
    (*a) = -1.0;
  }

  return;
}

/////////////////////////////////////////////////////////////////////////////
// config utils /////////////////////////////////////////////////////////////
