A method for setting a water temperature for a water heater, comprising: acquiring (S10, S30) an ambient temperature of a current day and an ambient temperature of a previous day, and acquiring (S20, S30) the amount of hot water used by a user on the previous day; determining a first variation in a water temperature setting of the water heater according to a temperature difference value between the ambient temperature of the current day and the ambient temperature of the previous day, and determining a second variation in the water temperature setting of the water heater according to the amount of hot water used by the user on the previous day; and calculating (S14, S24) the water temperature setting of the water heater on the current day according to the first variation and the second variation as well as the water temperature setting of the water heater on the previous day, wherein when the water heater has a pressure-bearing water tank, and an upper half portion of the pressure-bearing water tank is provided with a temperature sensor, acquiring the amount of hot water used by the user on the previous day specifically comprises: counting the number of times that a temperature value detected by the temperature sensor decreases at a rate greater than or equal to a predetermined rate during a predetermined period of time of the previous day; and determining the amount of hot water used by the user on the previous day according to the number of times, in which the number of times is positively correlated to the amount of hot water used by the user on the previous day. acquiring (S10, S30) an ambient temperature of a current day and an ambient temperature of a previous day, and acquiring (S20, S30) the amount of hot water used by a user on the previous day; determining a first variation in a water temperature setting of the water heater according to a temperature difference value between the ambient temperature of the current day and the ambient temperature of the previous day, and determining a second variation in the water temperature setting of the water heater according to the amount of hot water used by the user on the previous day; and calculating (S14, S24) the water temperature setting of the water heater on the current day according to the first variation and the second variation as well as the water temperature setting of the water heater on the previous day, wherein when the water heater has a pressure-bearing water tank, and an upper half portion of the pressure-bearing water tank is provided with a temperature sensor, acquiring the amount of hot water used by the user on the previous day specifically comprises: counting the number of times that a temperature value detected by the temperature sensor decreases at a rate greater than or equal to a predetermined rate during a predetermined period of time of the previous day; and determining the amount of hot water used by the user on the previous day according to the number of times, in which the number of times is positively correlated to the amount of hot water used by the user on the previous day. counting the number of times that a temperature value detected by the temperature sensor decreases at a rate greater than or equal to a predetermined rate during a predetermined period of time of the previous day; and determining the amount of hot water used by the user on the previous day according to the number of times, in which the number of times is positively correlated to the amount of hot water used by the user on the previous day.