def set_fan_mode(self, mode):
        """
        :param mode: a string one of ["on", "auto"]
        :return: nothing
        """
        desired_state = {"fan_mode": mode}

        response = self.api_interface.set_device_state(self, {
            "desired_state": desired_state
        })

        self._update_state_from_response(response)
def set_fan_mode ( self , mode ) : desired_state = { "fan_mode" : mode } response = self . api_interface . set_device_state ( self , { "desired_state" : desired_state } ) self . _update_state_from_response ( response )
:param mode: a string one of ["on", "auto"]
        :return: nothing