A method for controlling a device, applied in an indoor unit of a multi-split system, the method comprising: when a temperature sensor fails, selecting other indoor units operating in the same operation mode with a current indoor unit from all indoor units; obtaining corresponding sensor parameters from temperature sensors of the indoor units operating in the same operation mode; and controlling the device according to the obtained sensor parameters, characterized in that the controlling the device according to the obtained sensor parameters further comprises: performing median average filtering processing on all the obtained sensor parameters to obtain sensor reference parameters; and controlling the device according to the sensor reference parameters; wherein before the controlling the device according to the obtained sensor parameters, the method further comprises: obtaining a number of the sensor parameters; and when the number of the sensor parameters exceeds a specified threshold, controlling the device according to the obtained sensor parameters; wherein the median average filtering processing includes: removing a higher and lower part of data from all the obtained sensor parameters, and then averaging a remaining part of data from all the obtained sensor parameters. when a temperature sensor fails, selecting other indoor units operating in the same operation mode with a current indoor unit from all indoor units; obtaining corresponding sensor parameters from temperature sensors of the indoor units operating in the same operation mode; and controlling the device according to the obtained sensor parameters, characterized in that the controlling the device according to the obtained sensor parameters further comprises: performing median average filtering processing on all the obtained sensor parameters to obtain sensor reference parameters; and controlling the device according to the sensor reference parameters; wherein before the controlling the device according to the obtained sensor parameters, the method further comprises: obtaining a number of the sensor parameters; and when the number of the sensor parameters exceeds a specified threshold, controlling the device according to the obtained sensor parameters; wherein the median average filtering processing includes: removing a higher and lower part of data from all the obtained sensor parameters, and then averaging a remaining part of data from all the obtained sensor parameters. performing median average filtering processing on all the obtained sensor parameters to obtain sensor reference parameters; and controlling the device according to the sensor reference parameters; wherein before the controlling the device according to the obtained sensor parameters, the method further comprises: obtaining a number of the sensor parameters; and when the number of the sensor parameters exceeds a specified threshold, controlling the device according to the obtained sensor parameters; wherein the median average filtering processing includes: removing a higher and lower part of data from all the obtained sensor parameters, and then averaging a remaining part of data from all the obtained sensor parameters. obtaining a number of the sensor parameters; and when the number of the sensor parameters exceeds a specified threshold, controlling the device according to the obtained sensor parameters; wherein the median average filtering processing includes: removing a higher and lower part of data from all the obtained sensor parameters, and then averaging a remaining part of data from all the obtained sensor parameters.