Text this: Thermodynamics of photoelectric devices