A method of controlling a heating system that operates using power supplied from a power supply source, the heating system including: - a heat pump that generates heat using the power supplied from the power supply source; and - a radiator unit that radiates the heat generated by the heat pump, the heat pump being operable in a heating mode for generating heat to be radiated by the radiating unit and a defrost mode for removing frost formed on the heat pump, the method comprising: - obtaining, from the power supply source, an output modulation instruction specifying an output modulation period during which power consumption by the heat pump is modulated; - determining whether switching a mode of operation of the heat pump to the defrost mode is required; and - causing the heat pump to switch the mode of operation to the defrost mode when switching the mode of operation to the defrost mode is determined to be required in the determining, and continue operating in the heating mode when switching the mode of operation to the defrost mode is not determined to be required in the determining; wherein in the determining, - switching the mode of operation to the defrost mode is determined to be required when a state of the heat pump satisfies a first defrost condition in a period before the output modulation instruction is obtained in the obtaining, and - switching the mode of operation to the defrost mode is determined to be required when the state of the heat pump satisfies a second defrost condition in a given period occurring within a period starting when the output modulation instruction is obtained in the obtaining and ending at a start time of the output modulation period, the second defrost condition being more easily satisfied than the first defrost condition. - a heat pump that generates heat using the power supplied from the power supply source; and - a radiator unit that radiates the heat generated by the heat pump, the heat pump being operable in a heating mode for generating heat to be radiated by the radiating unit and a defrost mode for removing frost formed on the heat pump, - obtaining, from the power supply source, an output modulation instruction specifying an output modulation period during which power consumption by the heat pump is modulated; - determining whether switching a mode of operation of the heat pump to the defrost mode is required; and - causing the heat pump to switch the mode of operation to the defrost mode when switching the mode of operation to the defrost mode is determined to be required in the determining, and continue operating in the heating mode when switching the mode of operation to the defrost mode is not determined to be required in the determining; - switching the mode of operation to the defrost mode is determined to be required when a state of the heat pump satisfies a first defrost condition in a period before the output modulation instruction is obtained in the obtaining, and - switching the mode of operation to the defrost mode is determined to be required when the state of the heat pump satisfies a second defrost condition in a given period occurring within a period starting when the output modulation instruction is obtained in the obtaining and ending at a start time of the output modulation period, the second defrost condition being more easily satisfied than the first defrost condition.