We report on combined measurements of heat and charge transport through a single-electron transistor. The device acts as a heat switch actuated by the voltage applied on the gate. The Wiedemann-Franz law for the ratio of heat and charge conductances is found to be systematically violated away from the charge degeneracy points. The observed deviation agrees well with the theoretical expectation. With large temperature drop between the source and drain, the heat current away from degeneracy deviates from the standard quadratic dependence in the two temperatures.