   }
 }
 
+void processModeMessage(const MyMessage &message) {
+  if (message.sensor == CHILD_ID_MODE && message.type == V_LIGHT) {
+    MODE = message.getBool();
+    // Store state in eeprom
+    hw.saveState(CHILD_ID_MODE, MODE);
+  }
+}
+

// ----- GLOBAL
MySensor hw;
static char outstr[15];

void setup()
{

void incomingMessage(const MyMessage &message) {
  processHeatingMessage(message);
  processACMessage(message);
  processModeMessage(message);
}

void processHeatingMessage(const MyMessage &message) {
  // We only expect one type of message from controller. But we better check anyway.
  if (!MODE && message.sensor == CHILD_ID_RELAY && message.type == V_LIGHT) {
    // Change relay state
    digitalWrite(RELAY_PIN, message.getBool() ? RELAY_ON : RELAY_OFF);
    // Store state in eeprom
