Plug in the sandwich maker and observe the green light once it has reached a steady-state. Wait until the state of the green light changes (approx. 4-5 minutes). The machine has now reached the correct temperature.

Here:

sandwichMaker.plugIn(ringMains.getNearestFreeSocket(sandwichMaker.location));
assert(sandwichMaker.redLight.state == true);
bool greenLightState = sandwichMaker.greenLight.state;
while (sandwichMaker.greenLight.state == greenLightState) {};

// the machine has now reached the correct temperature.