   case PKT_RGB:
     send_rgb_rf24(toaddr, type, buffer);
     break;
+  case PKT_TEMP:
+    send_temp_rf24(toaddr, type, buffer);
+    break;
+  case PKT_HUMID:
+    send_humid_rf24(toaddr, type, buffer);
+    break;
   }
 }
 

  sensornet.addPowerRcvHandler(sendPowerMqtt);
  sensornet.addSwitchRcvHandler(sendSwitchMqtt);
  sensornet.addRgbRcvHandler(sendRgbMqtt);
}

void loop() {

  mqttClient.publish(constructMqttTopic(fromAddr, PKT_RGB), mqttPayload);
}

void sendTempMqtt(uint16_t fromAddr, uint16_t id, int16_t temp) {
  // Arduino's snprintf doesn't do floats.
  // So I'm about to commit an atrocity to fake it.
  int integral = (int)(temp/10);
  int fractional = temp-(integral*10);

  char mqttPayload[24];
  snprintf(mqttPayload, 24, "%i|%i|%i.%i", fromAddr, id, integral, fractional);
  mqttClient.publish(constructMqttTopic(fromAddr, PKT_TEMP), mqttPayload);
}

void sendHumidMqtt(uint16_t fromAddr, uint16_t id, uint16_t humidity) {
  int integral = (int)(humidity/10);
  int fractional = humidity-(integral*10);

  char mqttPayload[24];
  snprintf(mqttPayload, 24, "%i|%i|%i.%i", fromAddr, id, integral, fractional);
  mqttClient.publish(constructMqttTopic(fromAddr, PKT_HUMID), mqttPayload);
}

bool send_power_rf24(uint16_t toaddr, unsigned char type, char * buffer) {
  (void)buffer;
  // Not possible to set power state, so assume it's a req.
