In one aspect, a peritoneal dialysis (PD) machine can be used to detect a heater bag filled with dialysate. The PD machine has a heater tray that includes a temperature sensor and also has a processor that determines a status of the heater bag based on data received from the temperature sensor. For example, the status may be presence of the heater bag on the heater tray and/or correct positioning of the heater bag on the heater tray.